[Bug c/82100] gcc does not warn about code that is unreachable due to conflicting conditions [subset of reviving -Wunreachable-code]
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 5 07:52:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82100
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The FEs don't do static analysis that could detect this and it's incredibly
hard to do this during optimization given we'd have to track all instances of
code
(think of inlining, jump threading duplicating blocks, unrolling, etc.).
It might be possible to funnel this kind of warning into one of the very
early passes (but even those see inlines).
More information about the Gcc-bugs
mailing list