I would have expected a warning "statement with no effect"
for this code:

$ cat tmp.c
unsigned char foo(unsigned char a)
{
  a >> 2;
  return a;
}
$ gcc -S -Wall -O3 -Wextra tmp.c
$


-- 
           Summary: unsigned char shift lacks "statement with no effect"
                    warning
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37985

Reply via email to