This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
- 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: 27 Jun 2003 21:45:39 -0000
- Subject: [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
- References: <20030617175603.11224.mueller@kde.org>
- 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=11224
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.3.1 |3.4
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-06-27 21:45 -------
This defect cannot easily be fixed.
The key problem is that TREE_SIDE_EFFECTS isn't the right test; the "x == foo()"
expression has side-effects, but that doesn't mean that the result of the
comparison is being used.
Distinguishing that case from "foo()" itself can't be done with
TREE_SIDE_EFFECTS; we need to look at the actual expression itself.
I've retargeted this PR for 3.4.