C99 scoping seems to work apart from this, whose return b is invalid as there is no "b" in scope: int f (int z) { if (z > sizeof (enum {a, b})) return a; return b; } Neil.