R
Ric Has
I have the following code which won't compile:
typedef myType1 {
unsigned short v1,
unsigned char v2,
unsigned char v3
}
enum signals {
SIG_A,
SIG_B,
SIG_C
};
static const myType myEvents[] = {
{SIG_A, 0, 0},
{SIG_B, 0, 0},
{SIG_C, 0, 0}
};
The compiler error is
error: a brace-enclosed initializer is not allowed here before '{' token
This compiled fine with an old version of gcc, I think 2.96. This error
came from a more recent
vintage, 3.3.1.
Can anyone tell me why this isn't compiling? Thanks.
Ric
typedef myType1 {
unsigned short v1,
unsigned char v2,
unsigned char v3
}
enum signals {
SIG_A,
SIG_B,
SIG_C
};
static const myType myEvents[] = {
{SIG_A, 0, 0},
{SIG_B, 0, 0},
{SIG_C, 0, 0}
};
The compiler error is
error: a brace-enclosed initializer is not allowed here before '{' token
This compiled fine with an old version of gcc, I think 2.96. This error
came from a more recent
vintage, 3.3.1.
Can anyone tell me why this isn't compiling? Thanks.
Ric