home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / c / 19341 < prev    next >
Encoding:
Text File  |  1993-01-06  |  919 b   |  30 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!math.fu-berlin.de!hamel!rene
  3. From: rene@hamel.uucp (Rene Mueller)
  4. Subject: Re: Interesting bug
  5. Message-ID: <8GJ037B@math.fu-berlin.de>
  6. Sender: rene@hamel (Rene Mueller)
  7. Organization: Free University of Berlin, Germany
  8. References:  <92353.203941SML108@psuvm.psu.edu>
  9. Date: Thu, 7 Jan 1993 00:05:53 GMT
  10. Lines: 18
  11.  
  12. In article <92353.203941SML108@psuvm.psu.edu>, <SML108@psuvm.psu.edu> writes:
  13. |> I had a program with code like
  14. |> 
  15. |> void routine (x)
  16. |> int *x;
  17. |> {
  18. |>   int x;
  19. |> 
  20. |> 
  21. |> }
  22. |> 
  23. |> My compiler did not trap this as an error...  Shouldn't it?  Or at least
  24. |> give a warning?
  25. No, it should'nt give even a warning...
  26. Cause you open a new block with '{', and inside a new block you can define a NEW variable with an 'old' name...
  27. That mean that you will see the functionparameter right after the closing bracket '}', but that's too late....
  28.  
  29.     rene@math.fu-berlin.de
  30.