syscall table patch

Roland Dreier roland at topspin.com
Sat Nov 8 10:34:41 EST 2003


    Hollis> This may be a C99 thing, but:

    Hollis> #include <stdio.h>
    Hollis> void main(void) {
    Hollis>      int array[] = { [12] = 1, };
    Hollis>      printf("%i\n", array[0]);
    Hollis>      printf("%i\n", array[12]);
    Hollis> }

I'm not sure which version of the C spec added the "[XXX] = YYY" style
of array initializer, but it is supported by gcc versions at least as
far back as 2.95.  So it is definitely OK to use in kernel code.

 - Roland

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list