The 4.x compilers does not warn when using unset variables. The 3.x compilers did warn on this: Example: int use_unset_variable(int y) { int x; switch(y) { case 0: x = 0; break; default: break; } x++; return x; } Variable x could be unset when returning. I use all warnings possible: -Wall -W -Wextra Best Regards Fredrik
I am almost sure that this is CCP again assuming that the undefined value is the same as the constant assigned, hence x++ is converted to 0++. This can be checked using -fdump-tree-all-all-lineno. If so, a duplicate of bug 18501.
Yes this is a dup of bug 18501. *** This bug has been marked as a duplicate of 18501 ***