------- Comment #6 from mmitchel at gcc dot gnu dot org 2008-10-02 14:30 ------- You're getting an error because your code is invalid for the reason the error message states. The reason is that if the value of "i" is 1, you will end up in the "case 1" part with "j" uninitialized. You can put the entire body of the outer "case 0" inside braces, so that "j" is not in scope in the "case 1" part; that will eliminate the error.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28031