This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]