[Bug c++/12320] New: ICE on use of undefined enum

dannysmith at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 17 22:35: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=12320

           Summary: ICE on use of undefined enum
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dannysmith at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-pc-mingw32
  GCC host triplet: i386-pc-mingw32
GCC target triplet: i386-pc-mingw32

The following illegal code:

/* incomplete_t.c */
enum _incomplete_t;
extern void  foo (enum _incomplete_t);
/* end */ 
 
causes ICE with g++
g++ -Wall -c incomplete_t.c

incomplete_t.c:1: error: use of enum `_incomplete_t' without previous 
declaration
incomplete_t.c:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

but only warns with gcc
gcc -Wall -c incomplete_t.c

incomplete_t.c:2: warning: parameter has incomplete type

This is with gcc -v
Reading specs from D:/MINGW/BIN/../lib/gcc/mingw32/3.4/specs
Configured with: '../gcc/configure' '--with-gcc '--with-gnu-ld '--with-gnu-as '-
-host=mingw32 '--build=mingw32 '--target=mingw32 '--prefix=/mingw '--enable-
threads '--disable-nls '--enable-languages=c,c++,ada,f77,objc '--disable-win32-
registry '--disable-shared '--enable-sjlj-exceptions '--disable-libstdcxx-pch
Thread model: win32
gcc version 3.4 20030916 (experimental)

Danny



More information about the Gcc-bugs mailing list