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/60087] New: Incorrect column number for -Wsign-compare


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; 
 ^

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