------- Comment #9 from manu at gcc dot gnu dot org 2007-03-19 13:56 ------- (In reply to comment #8) > >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? >
And I think that we should not warn about generated code. No matter if it is generated by optimisers or front-ends. If it is not user code, then there should be no warning. In that sense, this is similar to PR31227. -- manu at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31246