This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25181] wrong "will never be executed" warning in switch - case block
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2005 16:08:59 -0000
- Subject: [Bug c++/25181] wrong "will never be executed" warning in switch - case block
- References: <bug-25181-9121@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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