T
Theo R.
Hi all,
I have the following struct defined -
#define INTEGER 0
#define STRING 1
typedef struct {
char type ;
union {
char buffer[8] ;
int number ;
} ;
} TOKEN ;
I want to create an array of these "TOKEN" structures and initialize
them globally. So I have
static TOKEN t[] = {
{INTEGER, 0} ,
{STRING, 0}
} ;
Is this legal? gcc throws a bunch of warnings for the initialization.
Thanks,
Theo
I have the following struct defined -
#define INTEGER 0
#define STRING 1
typedef struct {
char type ;
union {
char buffer[8] ;
int number ;
} ;
} TOKEN ;
I want to create an array of these "TOKEN" structures and initialize
them globally. So I have
static TOKEN t[] = {
{INTEGER, 0} ,
{STRING, 0}
} ;
Is this legal? gcc throws a bunch of warnings for the initialization.
Thanks,
Theo