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/63710] Incorrect column number for -Wconversion


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.

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