public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning
@ 2009-04-24 22:35 jakub at gcc dot gnu dot org
2009-04-24 22:36 ` [Bug c/39889] " jakub at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-24 22:35 UTC (permalink / raw)
To: gcc-bugs
/* { dg-do compile } */
/* { dg-options "-Wunused-value" } */
int x;
int foo (void)
{
return (1 ? x = 0 : (void) 0), 0; /* { dg-bogus "value computed is not used"
} */
}
warns in 4.4, didn't warn in 4.3 (pre-tuples merge) and doesn't warn in 4.4
(since r145254). I have a patch.
--
Summary: [4.4 Regression] Bogus -Wunused-value warning
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/39889] [4.4 Regression] Bogus -Wunused-value warning
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
@ 2009-04-24 22:36 ` jakub at gcc dot gnu dot org
2009-04-26 17:11 ` bangerth at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-24 22:36 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-24 22:35:54
date| |
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/39889] [4.4 Regression] Bogus -Wunused-value warning
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
2009-04-24 22:36 ` [Bug c/39889] " jakub at gcc dot gnu dot org
@ 2009-04-26 17:11 ` bangerth at gmail dot com
2009-04-26 18:51 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bangerth at gmail dot com @ 2009-04-26 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bangerth at gmail dot com 2009-04-26 17:10 -------
Jakub,
does your patch also fix PR 39875?
Thanks
W.
--
bangerth at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/39889] [4.4 Regression] Bogus -Wunused-value warning
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
2009-04-24 22:36 ` [Bug c/39889] " jakub at gcc dot gnu dot org
2009-04-26 17:11 ` bangerth at gmail dot com
@ 2009-04-26 18:51 ` jakub at gcc dot gnu dot org
2009-04-26 18:54 ` jakub at gcc dot gnu dot org
2009-04-26 19:08 ` jakub at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-26 18:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2009-04-26 18:51 -------
Subject: Bug 39889
Author: jakub
Date: Sun Apr 26 18:51:07 2009
New Revision: 146811
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146811
Log:
PR c/39889
* stmt.c (warn_if_unused_value): Look through NON_LVALUE_EXPR.
* gcc.dg/Wunused-value-3.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/Wunused-value-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fortran/ChangeLog
trunk/gcc/stmt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/39889] [4.4 Regression] Bogus -Wunused-value warning
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-04-26 18:51 ` jakub at gcc dot gnu dot org
@ 2009-04-26 18:54 ` jakub at gcc dot gnu dot org
2009-04-26 19:08 ` jakub at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-26 18:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-04-26 18:53 -------
Subject: Bug 39889
Author: jakub
Date: Sun Apr 26 18:53:41 2009
New Revision: 146812
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146812
Log:
PR c/39889
* stmt.c (warn_if_unused_value): Look through NON_LVALUE_EXPR.
* gcc.dg/Wunused-value-3.c: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/Wunused-value-3.c
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/stmt.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/39889] [4.4 Regression] Bogus -Wunused-value warning
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-04-26 18:54 ` jakub at gcc dot gnu dot org
@ 2009-04-26 19:08 ` jakub at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-04-26 19:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-04-26 19:08 -------
This is unrelated to PR39875, which looks like purely C++ FE issue.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-26 19:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24 22:35 [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning jakub at gcc dot gnu dot org
2009-04-24 22:36 ` [Bug c/39889] " jakub at gcc dot gnu dot org
2009-04-26 17:11 ` bangerth at gmail dot com
2009-04-26 18:51 ` jakub at gcc dot gnu dot org
2009-04-26 18:54 ` jakub at gcc dot gnu dot org
2009-04-26 19:08 ` jakub at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).