[gnu.gcc.bug] Bug with array constructors or in manual

kingdon@AI.MIT.EDU (Jim Kingdon) (02/04/90)

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.