Consider this:
GCC 3.4.5 gives me a crosses initialization of 'int object' error. Which is fine and solvable with a pair of curly braces.Code:int val = 0; switch(val) { case 1: int object = 0; break; case 2: break; default: break; }
But I'm curious. I cannot find on the standard any reference to this. It is an error indeed, if I try to use object on another case label. But I'm really not doing it above.
Is this gcc specific or is indeed an error specified by the standard?



LinkBack URL
About LinkBacks



CornedBee