[Bug c/12150] [3.3/3.4 regression] warning in dead code (comparison is always false) [regression]
mmitchel at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 5 05:43:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12150
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-09-05 05:43 -------
As I've said several times, GCC's approach of trying to use optimization (i.e.,
flow graph building, etc.) to produce warnings is far too clever for its own good.
These kinds of warnings should be issued entirely in the front end, as trees are
built. The back end has no business issuing warnings and warnings that appear
only when optimization is turned on, or depend on optimization passes, will
necessarily vary from release to release in unpredictable ways as the
optimization algorithms change.
If the user does not want warnings in code that is unreachable, that code should
be #ifdef'd out on platforms that are unreachable.
I am therefore classifying this PR as INVALID. If that's not acceptable to
Wolfgang :-), this should be debated on the GCC mailing list until consensus is
reached.
More information about the Gcc-bugs
mailing list