This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31246] Strange -Wunreachable-code warning with _GLIBCXX_DEBUG
- 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: 18 Mar 2007 05:38:25 -0000
- Subject: [Bug c++/31246] Strange -Wunreachable-code warning with _GLIBCXX_DEBUG
- References: <bug-31246-1902@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-03-18 05:38 -------
>I agree with you Paolo. The front-end should make sure that its
> artefacts don't adversily affect diagnostics we emit.
I agree to some extend. The reason why the try/catch is there is because of
what the C++ standard says should happen and not really an artafact of what the
GCC is doing really. When I first say this bug I was going to say this should
not warned about, but when I looked into it a little more, I was thinking the
warning is correct except for the fact, there is no way of working around the
issue.
I think we need to decide what -Wunreachable-code actually means, does it mean
if there is a way to "fix" the code, then warn about unreachable code or does
it mean to warn about code which is even hard to work around like in templates
and constructors?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246