static list initialization
Peter da Silva
peter at ficc.uu.net
Mon Oct 17 23:52:34 AEST 1988
> Without the 'extern', the compiler can't initialize 'head'. But with it, I
> get a 'non-standard extension' warning, although everything works just fine.
Would this work?
static struct whatever emptylist[2] = {
{ &emptylist[1], NULL, NULL },
{ NULL, &emptylist[0], NULL }
};
#define head &emptylist[0];
#define tail &emptylist[1];
--
Peter da Silva `-_-' Ferranti International Controls Corporation.
"Have you hugged U your wolf today?" peter at ficc.uu.net
More information about the Comp.lang.c
mailing list