[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-25 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 Jonathan Wakely changed: What|Removed |Added Status|WAITING |NEW --- Comment #5 from Jonathan Wakel

[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-22 Thread jg at jguk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 --- Comment #4 from Jonny Grant --- Hello Implicit conversion can introduce bugs. I would like to detect implicit enum conversions to other types in C and C++. How about just adding the C++ warnings first to match clang in example below? The fo

[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|

[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 --- Comment #2 from Jonathan Wakely --- At least when the sign doesn't change, i.e. for conversion to int. Please clarify what exactly you want a warning to do.

[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-21 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 --- Comment #1 from Jonathan Wakely --- Converting to integral types is a feature of enums, I see no reason to warn.

[Bug c++/92158] Enum warning when -1 enum converted to unsigned int or int

2019-10-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92158 Richard Biener changed: What|Removed |Added Keywords||diagnostic Version|unknown