Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!AI.MIT.EDU!kingdon From: kingdon@AI.MIT.EDU (Jim Kingdon) Newsgroups: gnu.gcc.bug Subject: Bug with array constructors or in manual Message-ID: <9002032317.AA02726@pogo> Date: 3 Feb 90 23:17:40 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: XX@no.where Distribution: gnu Organization: GNUs Not Usenet Lines: 26 The following example (which is straight from the manual) won't compile: kingdon@pogo$ gcc -v -g -O -pipe man.c -o man gcc version 1.36 /usr/local/lib/gcc-cpp -v -undef -D__GNUC__ -Dmc68000 -Dmc68020 -Dhp300 -Dhp9000 -Dunix -D__mc68000__ -D__mc68020__ -D__hp300__ -D__hp9000__ -D__unix__ -D__OPTIMIZE__ -D__HAVE_FPU__ man.c | /usr/local/lib/gcc-cc1 -quiet -dumpbase man.c -g -O -version -o - | /usr/local/lib/gcc-as -o man.o GNU CPP version 1.36 GNU C version 1.36 (68k, MIT syntax) compiled by GNU C version 1.36. default target switches: -m68020 -mc68020 -m68881 -mbitfield man.c: In function main: man.c:4: initializer for scalar has extra braces gcc: man.o: No such file or directory kingdon@pogo$ cat man.c int main (void) { char **foo = (char *[]) { "x", "y", "z" }; printf ("%s\n", foo[1]); } kingdon@pogo$ So this is either a bug in the compiler or the manual. Also, I think "gcc: man.o: No such file or directory" shouldn't be there.