This function compiles without problems:
void dummy123(void)
{
{ enum { BLA = 2 }; };
{ enum { BLA = 2 }; };
}
Adding a variable declaration between the two enums results in a compiler error because of a duplicate symbol:
void dummy123(void)
{
{ enum { BLA = 2 }; };
volatile int a = 3;
{ enum { BLA = 2 }; };
}
The error message is
xyz.c:271: error 0: Duplicate symbol 'BLA', symbol IGNORED
I tested this with the current svn trunk and with sdcc 4.2 on stm8.