This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Apr 2009 22:35:29 -0000
- Subject: [Bug c/39889] New: [4.4 Regression] Bogus -Wunused-value warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
/* { 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