[Bug middle-end/27825] New: False warning "value computed is not used"

ebermann at decomsys dot com gcc-bugzilla@gcc.gnu.org
Tue May 30 13:49:00 GMT 2006


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



More information about the Gcc-bugs mailing list