One good reason for this being legal is that the compiler might well be able to resolve the value at compile time, depending on what stage of development you're at.
E.g. you might use something like this for debugging stuff:
int glyphIndex;
...
#if CHECK_INVALID_GLYPH
glyphIndex = -1;
#endif
switch (glyphIndex)
...
The compiler knows for certain that glyphIndex is -1 here, so it's as good as a constant. Alternatively, you might code it like this:
#if CHECK_INVALID_GLYPH
const int glyphIndex = -1;
#else
int glyphIndex = GetGlyph();
#endif
You wouldn't really want to have to change the body of your switch statement just so you could make little changes like this, and the compiler is perfectly capable of rationalising the code to eliminate the parts that will never be executed anyway.