This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27825] New: False warning "value computed is not used"
- From: "ebermann at decomsys dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 May 2006 13:49:29 -0000
- Subject: [Bug middle-end/27825] New: False warning "value computed is not used"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code generates warning "value computed is not used" which
I interpret as a gcc bug.
typedef unsigned char uint8;
uint8 arr[10];
void testfunc(void);
void testfunc(void)
{
uint8 val = 5;
(1 == 0) ? : (arr[2] = val); /* this line generates false warning */
}
Changing statement "arr[2] = val" with e.g. "arr[2] = 4" makes the warning go
away.
--
Summary: False warning "value computed is not used"
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ebermann at decomsys dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m32c-elf-gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27825