Path: utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!apple!rutgers!njin!princeton!notecnirp!drh From: drh@notecnirp.Princeton.EDU (Dave Hanson) Newsgroups: gnu.gcc.bug Subject: initializer bug Message-ID: <12476@princeton.Princeton.EDU> Date: 8 Oct 88 13:26:43 GMT Sender: news@princeton.Princeton.EDU Reply-To: drh@princeton.Princeton.EDU (Dave Hanson) Distribution: gnu Organization: Dept. of Computer Science, Princeton University Lines: 16 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]