This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/60087] New: Incorrect column number for -Wsign-compare
- From: "chengniansun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Feb 2014 00:43:31 +0000
- Subject: [Bug c/60087] New: Incorrect column number for -Wsign-compare
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60087
Bug ID: 60087
Summary: Incorrect column number for -Wsign-compare
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: chengniansun at gmail dot com
Incorrect column number in -Wsign-compare warnings. The number always starts
from the head of the statement.
$: cat s.c
const unsigned char g_192 = 0;
unsigned fn1() {
return 0 != ~g_192;
}
$: gcc-trunk -c -Wsign-compare s.c
s.c: In function âfn1â:
s.c:3:1: warning: promoted ~unsigned is always non-zero [-Wsign-compare]
return 0 != ~g_192;
^