Given this code:
extern void use(int);
enum foo
{
a = 0, b, c, d
};
void
func(enum foo bar)
{
int x;
if(bar == a)
x = 0;
else if(bar == b)
x = 4;
else if(bar == c)
x = 9;
else if(bar == d)
x = 16;
use(x);
}
Is GCC allowed to assume that `bar' has one of the defined enumeration
values when compiling C? What about C++?
zw