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/79204] improve -Woverflow by mentioning types and values


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79204

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |egallager at gcc dot gnu.org
      Known to work|                            |8.0
         Resolution|---                         |FIXED

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
IIRC one of either you or Marek fixed this for gcc8:

$ /usr/local/bin/gcc -c -S -Wall 79204.c
79204.c:4:11: warning: overflow in conversion from ‘int’ to ‘T {aka signed
char}’ changes value from ‘28782’ to ‘110’ [-Woverflow]
 #define N (X * Y)
           ^
79204.c:6:7: note: in expansion of macro ‘N’
 T x = N;
       ^
$

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