[Bug c/60087] Incorrect column number for -Wsign-compare
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 6 06:49:00 GMT 2014
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,
More information about the Gcc-bugs
mailing list