[Bug c/63710] Incorrect column number for -Wconversion
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 30 22:01:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63710
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-07-30
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed. The location for the first one is still the same, but the location
for the second one has changed:
$ /usr/local/bin/gcc -c -Wconversion 63710.c
63710.c: In function ‘f1’:
63710.c:2:24: warning: conversion to ‘long unsigned int’ from ‘char’ may change
the sign of the result [-Wsign-conversion]
unsigned long r1 = ul + l;
^
63710.c:3:23: warning: conversion to ‘long unsigned int’ from ‘char’ may change
the sign of the result [-Wsign-conversion]
unsigned long r2 = l + ul;
^
63710.c: In function ‘f2’:
63710.c:8:15: warning: conversion to ‘unsigned int’ from ‘char’ may change the
sign of the result [-Wsign-conversion]
return l ? l : c;
~~~~~~^~~
63710.c:8:15: warning: conversion to ‘unsigned int’ from ‘long int’ may change
the sign of the result [-Wsign-conversion]
$
I agree that both could still be better.
More information about the Gcc-bugs
mailing list