[Bug c/60087] Incorrect column number for -Wsign-compare
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60087 --- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org --- Author: mpolacek Date: Thu Feb 6 13:57:37 2014 New Revision: 207554 URL: http://gcc.gnu.org/viewcvs?rev=207554root=gccview=rev Log: PR c/60087 c-family/ * c-common.c (warn_for_sign_compare): Call warning_at with location instead of warning. testsuite/ * gcc.dg/pr60087.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr60087.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/testsuite/ChangeLog
[Bug c/60087] Incorrect column number for -Wsign-compare
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60087 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED Target Milestone|--- |4.9.0 --- Comment #3 from Marek Polacek mpolacek at gcc dot gnu.org --- Fixed.
[Bug c/60087] Incorrect column number for -Wsign-compare
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60087 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2014-02-06 CC||mpolacek at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org --- This is because we call warning instead of warning_at. All other warnings in warn_for_sign_compare are already warning_at. The fix is easy safe, but technically it's not a regression, so not sure if it can go into trunk now. Maybe it can as a docfix. --- gcc/c-family/c-common.c +++ gcc/c-family/c-common.c @@ -11285,7 +11285,7 @@ warn_for_sign_compare (location_t location, if ((mask constant) != mask) { if (constant == 0) - warning (OPT_Wsign_compare, + warning_at (location, OPT_Wsign_compare, promoted ~unsigned is always non-zero); else warning_at (location, OPT_Wsign_compare,