This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/57004] New: False warning: comparison is always true due to limited range of data type [-Wtype-limits]
- From: "slava.garbuzov at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Apr 2013 11:42:03 +0000
- Subject: [Bug c/57004] New: False warning: comparison is always true due to limited range of data type [-Wtype-limits]
- Auto-submitted: auto-generated
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]
$