F
fred
Hi,
Can someone explain me why gcc-4.0 gives me the 'Initializer element is
not constant' error with this code ? Everything seems to be constant
here...
#include <stdio.h>
typedef struct { int a; int b;} t;
int main(int argc, char** argv)
{
static t* array[2] = {
(t[1]){ {1, 2} },
(t[2]){ {3, 4}, {5, 6} } };
return 0;
}
Thanks,
Fred
Can someone explain me why gcc-4.0 gives me the 'Initializer element is
not constant' error with this code ? Everything seems to be constant
here...
#include <stdio.h>
typedef struct { int a; int b;} t;
int main(int argc, char** argv)
{
static t* array[2] = {
(t[1]){ {1, 2} },
(t[2]){ {3, 4}, {5, 6} } };
return 0;
}
Thanks,
Fred