[Bug c/25314] [3.4/4.0/4.1/4.2 Regression] Unreachable code at beginning of switch statement is not reported anymore
Uwe dot Seimet at seimet dot de
gcc-bugzilla@gcc.gnu.org
Mon Dec 12 06:21:00 GMT 2005
------- Comment #6 from Uwe dot Seimet at seimet dot de 2005-12-12 06:21 -------
Subject: Re: [3.4/4.0/4.1/4.2 Regression] Unreachable code at beginning of
switch statement is not reported anymore
Hello,
Another comment from my side: When using -Wunreachable-code as a means
to detect unreachable code in a switch statement I noticed that, just like
the manpage says, -Wunreachable-code issues a lot of warnings when compiling
with -g. There are so many warnings with "-g -Wunreachable-code" that it is
impossible to see which warning is justified and which is not.
The behavior with old versions of gcc was much more transparent. With gcc
3.3 I got an accurate warning for the unreachable code in the code sample I
sent you. Which gcc 4.0 I only get this warning with -Wunreachable-code,
but there are so many other (not useful) warnings that -Wunreachable-code
is not a good solution wrt the switch statement.
Best regards, Uwe
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25314
More information about the Gcc-bugs
mailing list