* [Bug c++/11224] [regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
@ 2003-06-17 17:56 ` mueller@kde.org
2003-06-17 18:12 ` [Bug c++/11224] [3.3/3.4 regression] " pinskia@physics.uc.edu
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mueller@kde.org @ 2003-06-17 17:56 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From mueller@kde.org 2003-06-17 17:56 -------
Created an attachment (id=4236)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4236&action=view)
testcase showing the problem.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
2003-06-17 17:56 ` [Bug c++/11224] " mueller@kde.org
@ 2003-06-17 18:12 ` pinskia@physics.uc.edu
2003-06-17 18:26 ` dhazeghi@yahoo.com
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-17 18:12 UTC (permalink / raw)
To: gcc-bugs
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
pinskia@physics.uc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-06-17 18:12:14
date| |
Summary|[regression] warning "value |[3.3/3.4 regression] warning
|computed is not used" no |"value computed is not used"
|longer emitted |no longer emitted
Target Milestone|3.4 |3.3.1
Version|unknown |3.0.4
------- Additional Comments From pinskia@physics.uc.edu 2003-06-17 18:12 -------
I can confirm this on the mainline (20030617), I think the problem is that isEmpty is not really
being marked const so gcc says that there could be some side-effects which is clearly not true.
from stmt.c:2430:
/* If this is an expression with side effects, don't warn. */
if (TREE_SIDE_EFFECTS (exp))
return 0;
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
2003-06-17 17:56 ` [Bug c++/11224] " mueller@kde.org
2003-06-17 18:12 ` [Bug c++/11224] [3.3/3.4 regression] " pinskia@physics.uc.edu
@ 2003-06-17 18:26 ` dhazeghi@yahoo.com
2003-06-18 18:27 ` mueller at kde dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-17 18:26 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From dhazeghi@yahoo.com 2003-06-17 18:26 -------
Note that RedHat's patched 2.96 warns correctly while 3.0 does not.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (2 preceding siblings ...)
2003-06-17 18:26 ` dhazeghi@yahoo.com
@ 2003-06-18 18:27 ` mueller at kde dot org
2003-06-27 21:45 ` mmitchel at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mueller at kde dot org @ 2003-06-18 18:27 UTC (permalink / raw)
To: gcc-bugs
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
------- Additional Comments From mueller at kde dot org 2003-06-18 18:26 -------
adding __attribute__ ((pure)) or __attribute__ ((const)) makes no difference.
however, its indeed caused by the HAS_SIDEEFFECTS check, as further checking
has confirmed.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (3 preceding siblings ...)
2003-06-18 18:27 ` mueller at kde dot org
@ 2003-06-27 21:45 ` mmitchel at gcc dot gnu dot org
2003-09-06 19:39 ` nathan at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-06-27 21:45 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (4 preceding siblings ...)
2003-06-27 21:45 ` mmitchel at gcc dot gnu dot org
@ 2003-09-06 19:39 ` nathan at gcc dot gnu dot org
2003-12-29 17:51 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: nathan at gcc dot gnu dot org @ 2003-09-06 19:39 UTC (permalink / raw)
To: gcc-bugs
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
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
------- Additional Comments From nathan at gcc dot gnu dot org 2003-09-06 19:39 -------
add more smarts to convert_to_void so that it looks at the outermost tree code
to figure if that causes sideeffects
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (5 preceding siblings ...)
2003-09-06 19:39 ` nathan at gcc dot gnu dot org
@ 2003-12-29 17:51 ` pinskia at gcc dot gnu dot org
2004-01-10 23:22 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-29 17:51 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (6 preceding siblings ...)
2003-12-29 17:51 ` pinskia at gcc dot gnu dot org
@ 2004-01-10 23:22 ` pinskia at gcc dot gnu dot org
2004-01-12 23:39 ` steven at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-10 23:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-10 23:22 -------
This is regression from 2.95.3 so moving to 3.4.1 and this should not block the branching.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.0 |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (7 preceding siblings ...)
2004-01-10 23:22 ` pinskia at gcc dot gnu dot org
@ 2004-01-12 23:39 ` steven at gcc dot gnu dot org
2004-02-20 9:09 ` [Bug c++/11224] [3.3/3.4/3.5 " mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-01-12 23:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-01-12 23:39 -------
Move back the target for all regressions from 3.4.1 to 3.4.0, as required by
our bug management policy.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4/3.5 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (8 preceding siblings ...)
2004-01-12 23:39 ` steven at gcc dot gnu dot org
@ 2004-02-20 9:09 ` mmitchel at gcc dot gnu dot org
2004-11-29 12:03 ` [Bug c++/11224] [3.3/3.4/4.0 " nathan at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-20 9:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-02-20 09:09 -------
Postponing until 3.5; any fix will be more dangerous than useful for 3.4.x.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.0 |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4/4.0 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (9 preceding siblings ...)
2004-02-20 9:09 ` [Bug c++/11224] [3.3/3.4/3.5 " mmitchel at gcc dot gnu dot org
@ 2004-11-29 12:03 ` nathan at gcc dot gnu dot org
2004-12-22 4:57 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: nathan at gcc dot gnu dot org @ 2004-11-29 12:03 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nathan at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4/4.0 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (10 preceding siblings ...)
2004-11-29 12:03 ` [Bug c++/11224] [3.3/3.4/4.0 " nathan at gcc dot gnu dot org
@ 2004-12-22 4:57 ` mmitchel at gcc dot gnu dot org
2004-12-22 18:01 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-22 4:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-22 04:57 -------
Working on a fix.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4/4.0 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (11 preceding siblings ...)
2004-12-22 4:57 ` mmitchel at gcc dot gnu dot org
@ 2004-12-22 18:01 ` cvs-commit at gcc dot gnu dot org
2004-12-22 18:07 ` [Bug c++/11224] [3.3/3.4 " mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-22 18:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-22 18:01 -------
Subject: Bug 11224
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-12-22 18:00:41
Modified files:
gcc/testsuite : ChangeLog
gcc/cp : ChangeLog call.c cp-gimplify.c cvt.c rtti.c
typeck.c
Added files:
gcc/testsuite/g++.dg/template: cond5.C
gcc/testsuite/g++.dg/inherit: thunk3.C
gcc/testsuite/g++.dg/warn: Wunused-9.C
Log message:
PR c++/18464
* call.c (build_this): In templates, do not bother with
build_unary_op.
* typeck.c (unary_complex_lvalue): In a template, always refuse
simplifications.
PR c++/18492
* cp-gimplify.c (cp_genericize): Relax assertion.
PR c++/11224
* cvt.c (convert_to_void): Warn about unused values.
PR c++/18257
* rtti.c (emit_support_tinfos): On systems without weak symbols,
emit the runtime library type-info objects as non-COMDAT.
PR c++/18464
* g++.dg/template/cond5.C: New test.
PR c++/18492
* g++.dg/inherit/thunk3.C: New test.
PR c++/11224
* g++.dg/warn/Wunused-9.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4799&r2=1.4800
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/cond5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/thunk3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/warn/Wunused-9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4551&r2=1.4552
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.524&r2=1.525
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-gimplify.c.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cvt.c.diff?cvsroot=gcc&r1=1.174&r2=1.175
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/rtti.c.diff?cvsroot=gcc&r1=1.205&r2=1.206
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.605&r2=1.606
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (12 preceding siblings ...)
2004-12-22 18:01 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-22 18:07 ` mmitchel at gcc dot gnu dot org
2005-01-10 19:01 ` jgrimm2 at us dot ibm dot com
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-22 18:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-22 18:06 -------
Fixed in G++ 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.3/3.4/4.0 regression] |[3.3/3.4 regression] warning
|warning "value computed is |"value computed is not used"
|not used" no longer emitted |no longer emitted
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (13 preceding siblings ...)
2004-12-22 18:07 ` [Bug c++/11224] [3.3/3.4 " mmitchel at gcc dot gnu dot org
@ 2005-01-10 19:01 ` jgrimm2 at us dot ibm dot com
2005-01-31 6:56 ` pinskia at gcc dot gnu dot org
2005-05-19 17:23 ` mmitchel at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: jgrimm2 at us dot ibm dot com @ 2005-01-10 19:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jgrimm2 at us dot ibm dot com 2005-01-10 19:01 -------
FWIW, the xfail on Wunused-9.C :
...
+f(); // { dg-warning "not used" "" { xfail *-*-* } }
...
is no longer failing, per:
http://gcc.gnu.org/ml/gcc-testresults/2004-12/msg01344.html
http://gcc.gnu.org/ml/gcc-testresults/2004-12/msg01354.html
no longer an xfail?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (14 preceding siblings ...)
2005-01-10 19:01 ` jgrimm2 at us dot ibm dot com
@ 2005-01-31 6:56 ` pinskia at gcc dot gnu dot org
2005-05-19 17:23 ` mmitchel at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-31 6:56 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.0 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/11224] [3.3/3.4 regression] warning "value computed is not used" no longer emitted
2003-06-17 17:56 [Bug c++/11224] New: [regression] warning "value computed is not used" no longer emitted mueller@kde.org
` (15 preceding siblings ...)
2005-01-31 6:56 ` pinskia at gcc dot gnu dot org
@ 2005-05-19 17:23 ` mmitchel at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:23 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11224
^ permalink raw reply [flat|nested] 18+ messages in thread