[Bug c++/60342] -Wsign-conversion ignores explicit conversion

2017-08-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60342

Eric Gallager  changed:

   What|Removed |Added

 CC||ian at geometrian dot com

--- Comment #3 from Eric Gallager  ---
*** Bug 80157 has been marked as a duplicate of this bug. ***

[Bug c++/60342] -Wsign-conversion ignores explicit conversion

2017-08-22 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60342

Eric Gallager  changed:

   What|Removed |Added

 CC||yaghmour.shafik at gmail dot 
com

--- Comment #2 from Eric Gallager  ---
*** Bug 66170 has been marked as a duplicate of this bug. ***

[Bug c++/60342] -Wsign-conversion ignores explicit conversion

2017-08-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60342

Eric Gallager  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |RESOLVED
 CC||egallager at gcc dot gnu.org
 Resolution|--- |WORKSFORME

--- Comment #1 from Eric Gallager  ---
gcc8 no longer prints the -Wsign-conversion warning, but instead prints one for
-Wuninitialized:

$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic -Wconversion -Wsign-conversion
60342.cc
60342.cc: In function ‘int main()’:
60342.cc:7:43: warning: ‘int_value’ is used uninitialized in this function
[-Wuninitialized]
  if (std::numeric_limits::max() - static_cast(int_value))
   ^~
$

Maybe -Wsign-conversion was fixed, but I dunno for sure, so I'll just say
WORKSFORME.