This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]