home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / g / bug / 2345 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.0 KB  |  29 lines

  1. Path: sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.wisc.edu!solomon
  2. From: solomon@cs.wisc.edu (Marvin Solomon)
  3. Newsgroups: gnu.g++.bug
  4. Subject: mysterious error message
  5. Date: 26 Jan 1993 22:00:59 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 16
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-g++@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <9301261250.AA12619@gjetost.cs.wisc.edu>
  12.  
  13. With g++ 2.3.3, the following program:
  14.     int main(int, char**) {
  15.         goto L;
  16.         int i=0;
  17.     L: return 0;
  18.     }
  19. generates the following error messages (and no others):
  20.     bug14.c: In function `int  main (int, char **)':
  21.     bug14.c:3: crosses initialization of `i'
  22.  
  23. In this simple test, it is clear that the word "goto" is omitted from
  24. the message, but I had a heck of a time figuring out what was wrong when
  25. this came up in a big program and both the goto and the label were
  26. far from the line affected (the "3" in the message is the line number of
  27. the initialization).
  28.  
  29.