Article View: gnu.g++.bug
Article #1433mysterious error message
From: Marvin Solomon
Date: Wed, 27 Jan 1993 03:00
Date: Wed, 27 Jan 1993 03:00
15 lines
1050 bytes
1050 bytes
With g++ 2.3.3, the following program:
int main(int, char**) {
goto L;
int i=0;
L: return 0;
}
generates the following error messages (and no others):
bug14.c: In function `int main (int, char **)':
bug14.c:3: crosses initialization of `i'
In this simple test, it is clear that the word "goto" is omitted from
the message, but I had a heck of a time figuring out what was wrong when
this came up in a big program and both the goto and the label were
far from the line affected (the "3" in the message is the line number of
the initialization).
Technical Details
Message-ID:
<9301261250.AA12619@gjetost.cs.wisc.edu>Path:
arc1-ca.pugleaf.net!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!solomonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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 From: solomon@cs.wisc.edu (Marvin Solomon) Newsgroups: gnu.g++.bug Subject: mysterious error message Date: 26 Jan 1993 22:00:59 -0500 Organization: GNUs Not Usenet Lines: 16 Sender: daemon@cis.ohio-state.edu Approved: bug-g++@prep.ai.mit.edu Distribution: gnu Message-ID: <9301261250.AA12619@gjetost.cs.wisc.edu>