This is the mail archive of the
mailing list for the GCC project.
a step backward from egcs-902021 to egcs-980302 ?
- To: egcs-bugs at cygnus dot com
- Subject: a step backward from egcs-902021 to egcs-980302 ?
- From: dcb at pncl dot co dot uk (David C Binderman)
- Date: Tue, 3 Mar 1998 18:32:46 GMT
Using g++ 22.214.171.124 or egcs-980221 on the following code
main(int argc, char *argv)
on machine i486-pc-linux-gnulibc1 then I get
/tmp/cca29102.s: Assembler messages:
/tmp/cca29102.s:26: Fatal error: Symbol main already defined.
which is ok, but not brilliant, as an error message. But when I use
egcs-980302 on the same machine I get
mar3.cc: In function `int main()':
mar3.cc:10: Error: Internal compiler error 378.
mar3.cc:10: Error: Please submit a full bug report to `firstname.lastname@example.org'.
It seems that having two versions of main in the same file is not a
likely error, but my understanding of C++ is that it is an error which
should be diagnosed.
There is the related issue of what happens when the two definitions
are in two different files.
David Binderman MSc BSc +44 1293 534 847 dcb_AVOID_JUNK_MAIL@pncl.co.uk
There is no substitute for skill, taste and experience when programming
- Dr Stroustrup, inventor of C++