[Bug c++/57170] Diagnostic for a negative case when switching over unsigned comes from -Wsign-conversion instead of -Wpedantic or -Wnarrowing

2019-05-29 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 --- Comment #7 from Eric Gallager --- (In reply to Jonathan Wakely from comment #6) > It should be an error, not a warning. For other narrowing conversions > involving constants we do actually use -Wnarrowing (but still defaulting to > an error)

[Bug c++/57170] Diagnostic for a negative case when switching over unsigned comes from -Wsign-conversion instead of -Wpedantic or -Wnarrowing

2018-08-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 --- Comment #6 from Jonathan Wakely --- It should be an error, not a warning. For other narrowing conversions involving constants we do actually use -Wnarrowing (but still defaulting to an error) so I guess my last comment was wrong. Or it

[Bug c++/57170] Diagnostic for a negative case when switching over unsigned comes from -Wsign-conversion instead of -Wpedantic or -Wnarrowing

2018-08-28 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 --- Comment #5 from Eric Gallager --- (In reply to Jonathan Wakely from comment #4) > Diagnostics for narrowing conversions involving non-constants are controlled > by -Wnarrowing (allowing them to be either warnings or errors). But > narrowing

[Bug c++/57170] Diagnostic for a negative case when switching over unsigned comes from -Wsign-conversion instead of -Wpedantic or -Wnarrowing

2017-08-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 --- Comment #4 from Jonathan Wakely --- Diagnostics for narrowing conversions involving non-constants are controlled by -Wnarrowing (allowing them to be either warnings or errors). But narrowing conversions involving constants are always errors.

[Bug c++/57170] Diagnostic for a negative case when switching over unsigned comes from -Wsign-conversion instead of -Wpedantic or -Wnarrowing

2017-08-23 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 Eric Gallager changed: What|Removed |Added Keywords||accepts-invalid