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 c/57004] New: False warning: comparison is always true due to limited range of data type [-Wtype-limits]


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: unassigned@gcc.gnu.org
        ReportedBy: slava.garbuzov@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]
$


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