This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/63710] Incorrect column number for -Wconversion
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Jul 2017 22:01:18 +0000
- Subject: [Bug c/63710] Incorrect column number for -Wconversion
- Auto-submitted: auto-generated
- References: <bug-63710-4@http.gcc.gnu.org/bugzilla/>
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.