[Bug c++/25181] wrong "will never be executed" warning in switch - case block

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Nov 30 16:09:00 GMT 2005



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-30 16:08 -------
This is invalid code:
t.cc: In function ‘int test_18()’:
t.cc:15: error: jump to case label
t.cc:9: error:   crosses initialization of ‘int ret’
t.cc:18: error: jump to case label
t.cc:9: error:   crosses initialization of ‘int ret’

We should reject this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25181



More information about the Gcc-bugs mailing list