[Bug c++/12570] G++ fails to accept a legal struct declaration in a namespace

wirawan0 at softhome dot net gcc-bugzilla@gcc.gnu.org
Fri Oct 10 16:07:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12570



------- Additional Comments From wirawan0 at softhome dot net  2003-10-10 16:07 -------
Created an attachment (id=4914)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4914&action=view)
The stumbling source code

Here is the (initial part of) cc1plus output message:

GNU C++ version 3.3.1 (i686-pc-linux-gnu)
compiled by GNU C version 3.3.1.
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32018
In file included from src/cp.inc/LAPACK_dsyevx.cpp:100,
		 from src/tbhqmc-dmc.cpp:160:
src/cp.inc/support/f2c.h:35: error: semicolon missing after struct declaration
src/cp.inc/support/f2c.h:35: error: abstract declarator `f2c::<anonymous 
   struct>' used as declaration
src/cp.inc/support/f2c.h:35: error: namespace-scope anonymous aggregates must 
   be static
src/tbhqmc-dmc.cpp:274: error: syntax error before `;' token
src/tbhqmc-dmc.cpp:282: error: syntax error before `;' token
[lots more message follows]

The stumbling source line is at line 42418 of file tbhqmc-dmc.ii.

Here's the command-line (invocation of cc1plus) that's known to give the same
error (the basepath of cc1plus may vary):

 /usr/local/gcc-3.3.1/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/cc1plus
-fpreprocessed tbhqmc-dmc.ii -quiet -dumpbase tbhqmc-dmc.cpp -mcpu=i686
-march=i686 -minline-all-stringops -mcpu=i686 -march=i686
-minline-all-stringops -auxbase-strip objs-DEBUG/tbhqmc-dmc-1d.o -g -Wall
-Winline -version -fno-exceptions -o tbhqmc-dmc.s



More information about the Gcc-bugs mailing list