Why can't I do this?

P. T. Withington ptw at vaxine.UUCP
Fri Jan 13 05:18:27 AEST 1984


I (foolishly) presumed by analogy with:

static char *foo[] = {"hello",
                      "out",
                      "there"};

that I could:

static int *bar[] = {{0, 1, 2},
                     {3, 4},
                     {5, 6, 7, 8}};

but I can't.  My compiler (4.2) pukes with:

xxxxxx.c(NN): compiler error: initialization alignment error

Why?  Should it?

                                --ptw



More information about the Comp.lang.c mailing list