This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12150] [3.3/3.4 regression] warning in dead code (comparison is always false) [regression]
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2003 05:43:31 -0000
- Subject: [Bug c/12150] [3.3/3.4 regression] warning in dead code (comparison is always false) [regression]
- References: <20030903084134.12150.mattias@virtutech.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.