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++/31246] Strange -Wunreachable-code warning with _GLIBCXX_DEBUG



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


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