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



             Bug #: 57004

           Summary: False warning: comparison is always true due to

                    limited range of data type [-Wtype-limits]

    Classification: Unclassified

           Product: gcc

           Version: 4.7.2

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: slava.garbu...@gmail.com





Reproduced with cross linaro-gcc 4.6.3 and FSF 4.7.2 for ARM.

Cannot be reproduced with native GCC 4.6.3 on x86



$ cat test.c

int main() {

  char a = 'a';

  return (a >= 0);

}

$

$ arm-none-linux-gnueabi-gcc test.c -Wextra

test.c: In function 'main':

test.c:3:3: warning: comparison is always true due to limited range of data

type [-Wtype-limits]

$

Reply via email to