The output of make: g++ -g -O2 -Wall -D_REENTRANT -DLINUX_THREADS -I/usr/include/gc -c -o LayoutBox.o LayoutBox.cpp LayoutBox.cpp: In method `int LayoutBox::handle (int)': LayoutBox.cpp:32: parse error before `->' LayoutBox.cpp:38: parse error before `->' LayoutBox.cpp:44: parse error before `->' LayoutBox.cpp:50: Internal error #122. LayoutBox.cpp:50: Internal compiler error in finish_function, at ../gcc/cp/decl.c:14422 Please submit a full bug report. See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions. The code itself: /* 29 */ case FL_PUSH: /* 30 */ fprintf(stderr, "FL_PUSH, button is %i\n", Fl::event_button()); /* 31 */ if ((mymon) && (1 == (Fl::event_button())) /* 32 */ mymon->selectObject(Fl::event_x(), Fl::event_y()); /* 33 */ return 1; /* 34 */ break; + another 2 times such a case-block. At line 31, there needs to be an extra ')' symbol but the compiler isn't able to generate a normal errormessage. When i add the ')' symbol add line 31 and at lines 37 and 43 (almost the same line as 31), everything works fine. Please let me know if you need any extra information. I tried to check if this bug was already reported but when i press 'query', i get an empty page.
Please either try latest gcc-c++ package from rawhide (ideally 2.96-69, hopefully rawhide will be cut soon) if it is still reproduceable (since -66 or so the compiler should never ICE if it diagnosed errors before). Alternatively, rerun the above g++ command with -save-temps -v options and attach here LayoutBox.ii which g++ generates, so I can test it myself. Thanks.
Created attachment 6616 [details] LayoutBox.ii.gcc-2.96-65
I installed the latest rpms from rawhide for alpha: gcc-2.96-65 gcc-c++-2.96-65 cpp-2.96-65 The output of make now gives: g++ -save-temps -v -g -O2 -Wall -D_REENTRANT -DLINUX_THREADS -I/usr/include/gc -c -o LayoutBox.o LayoutBox.cpp Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.0) /usr/lib/gcc-lib/alpha-redhat-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -v -I/usr/include/gc -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dlinux -Dunix -D_LONGLONG -D__alpha__ -D__ELF__ -D__linux__ -D__unix__ -D_LONGLONG -D__alpha__ -D__ELF__ -D__linux -D__unix -Asystem(linux) -D__OPTIMIZE__ -g -Wall -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev4__ -Acpu(ev4) -D_REENTRANT -DLINUX_THREADS LayoutBox.cpp LayoutBox.ii GNU CPP version 2.96 20000731 (Red Hat Linux 7.0) (cpplib) (Alpha GNU/Linux for ELF) ignoring nonexistent directory "/usr/include/gc" ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/alpha-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/include/g++-3 /usr/lib/gcc-lib/alpha-redhat-linux/2.96/include /usr/include End of search list. /usr/lib/gcc-lib/alpha-redhat-linux/2.96/cc1plus LayoutBox.ii -quiet -dumpbase LayoutBox.cpp -g -O2 -Wall -version -o LayoutBox.s GNU C++ version 2.96 20000731 (Red Hat Linux 7.0) (alpha-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0). LayoutBox.cpp: In method `int LayoutBox::handle (int)': LayoutBox.cpp:32: parse error before `->' LayoutBox.cpp:38: parse error before `->' LayoutBox.cpp:45: parse error before `->' LayoutBox.cpp:52: confused by earlier errors, bailing out make: *** [LayoutBox.o] Error 1 It doesn't result in an internal error anymore. Please let me know if you need extra information or tests but probably this is the correct output? You can find all the files at ftp://skotty.ulyssis.org/pub/
Yes, this is the output you should get. Note that g++ 2.95.2 gives you exactly the same error messages for this input (including the confused... error, which just means that the compiler will not try to diagnose further errors).