drh@notecnirp.Princeton.EDU (Dave Hanson) (10/08/88)
my reading of the 5/88 standard and K&R2 says that the following initializations are legal (ie, the {} are optional) but gcc complains. [703] cat bug4.c union { int x; char *y; } a = 5; struct { int x; char *y; } b = 6; [704] gcc -S -v bug4.c gcc version 1.28 /usr/local/lib/gcc-cpp -v -undef -D__GNU__ -D__GNUC__ -Dvax -Dunix bug4.c /tmp/cc028798.cpp GNU CPP version 1.28 /usr/local/lib/gcc-cc1 /tmp/cc028798.cpp -quiet -dumpbase bug4.c -version -o bug4.s GNU C version 1.28 (vax) compiled by GNU C version 1.28. bug4.c:1: type mismatch in initialization bug4.c:2: invalid initializer [705]