drh@PRINCETON.EDU (Dave Hanson) (04/08/89)
i've just fixed your enum bug, but then i read k&r2, p213: ``...incomplete enumeration types do not exist; the tag of an enum-specifier without an enumerator list must refer to an in-scope specifier with a list.'' i'll double-check the standard, but i think lcc had it right, and gcc has it wrong. if so, i'm undoing my `fix'. here's a simple example of the error. % cat bug1.c typedef enum foo Foo; enum foo { one, two, three }; Foo x; % gcc -v -S bug1.c gcc version 1.34 /usr/local/gnu/lib/gcc-cpp -v -undef -D__GNUC__ -Dvax -Dunix -D__vax__ -D__unix__ bug1.c /tmp/cc028458.cpp GNU CPP version 1.34 /usr/local/gnu/lib/gcc-cc1 /tmp/cc028458.cpp -quiet -dumpbase bug1.c -version -o bug1.s GNU C version 1.34 (vax) compiled by GNU C version 1.34. % lcc -S bug1.c bug1.c:1: unknown enumeration `foo' %