This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]