home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18700 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  944 b 

  1. Path: sparky!uunet!sdrc!thor!scjones
  2. From: scjones@thor.sdrc.com (Larry Jones)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Interesting bug
  5. Message-ID: <2418@sdrc.COM>
  6. Date: 19 Dec 92 19:11:58 GMT
  7. References: <92353.203941SML108@psuvm.psu.edu>
  8. Sender: news@sdrc.COM
  9. Lines: 18
  10.  
  11. In article <92353.203941SML108@psuvm.psu.edu>, SML108@psuvm.psu.edu writes:
  12. > void routine (x)
  13. > int *x;
  14. > {
  15. >   int x;
  16. > }
  17. > My compiler did not trap this as an error...  Shouldn't it?  Or at least
  18. > give a warning?
  19.  
  20. If it claims to be an ANSI compiler, then it should have produced some
  21. kind of diagnostic.  Most pre-ANSI compilers, however, considered the
  22. parameters to be at an outer scope level than the local variables which
  23. makes this a perfectly valid override.
  24. ----
  25. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  26. larry.jones@sdrc.com  or  ...uunet!sdrc!larry.jones
  27. I've got to start listening to those quiet, nagging doubts. -- Calvin
  28.