static struct initialization question
Hi all,
I need to statically intialize a structure which looks like:
struct items
{
int first;
int *others;
}Where "others" points to a 0-terminated list of ints.
I plan to initialize it that way:
static struct items s = {
.first = 1;
.others = (int[]) {
2,
3,
0
}
};It works fine here with gcc 3.3.4. Question is, is this style allowed in the kernel? I think it's C99 standard. I only found such constructs in arch/ppc/syslib/mpc*.c and sound/usb/usbquirks.h.
Thanks,
Signature · 1 line
Jean Delvare