Additional gcc-2.95 enum Bug
Michael Roth
mroth@nessie.de
Thu Jan 13 20:27:00 GMT 2000
Hi,
while working on my project with a lot of enums, I discovered an
additional bug in the C++ frontend.
The following wrong source code terminates with an internal compiler
error 40. I think this bug is somewhat related to the bug I posted a few
hours ago.
-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
enum X { AA, BB };
void test()
{
X a = AA // <--- Missing semicolon
X b = BB;
}
-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
The compiler output:
-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
#> c++ -c -v bug2.cpp
Reading specs from /opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/specs
gcc version 2.95 19990728 (release)
/opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ bug2.cpp /tmp/cc1nHr2L.ii
GNU CPP version 2.95 19990728 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
/opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/include/g++
/usr/local/include
/opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/../../../../i586-pc-linux-gnulibc1/include
/opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/include
/usr/include
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/opt/gnu/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95/cc1plus /tmp/cc1nHr2L.ii -quiet -dumpbase bug2.cc -version -o /tmp/ccIAEbFp.s
GNU C++ version 2.95 19990728 (release) (i586-pc-linux-gnulibc1) compiled by GNU C version 2.95 19990728 (release).
bug2.cpp: In function `void test()':
bug2.cpp:7: Internal compiler error 40.
bug2.cpp:7: Please submit a full bug report.
bug2.cpp:7: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for instructions.
-------- 8>< -------- 8>< -------- 8>< -------- 8>< --------
System is Linux-2.0.35, i386, libc5, ELF.
If you have questions please CC my because I don't read this list.
cu
Michael
More information about the Gcc-bugs
mailing list