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

Albert Netymk <albertnetymk at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |albertnetymk at gmail dot com

--- Comment #16 from Albert Netymk <albertnetymk at gmail dot com> ---
I am aware that, in C++, it is intended that -Wconversion doesn't imply
-Wsign-conversion, and the corresponding documentation is super clear about
this fact.

According to the documentation
(https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html), "Warnings about
conversions between signed and unsigned integers are disabled by default in C++
unless -Wsign-conversion is explicitly enabled."

However, from an end-user perspective, this inconsistency (implying
sign-conversion in C but not in C++) is quite surprising. Additionally, in
clang, -Wconversion always implies -Wsign-conversion.

Therefore, having -Wconversion unconditionally imply -Wsign-conversion would
provide a more consistent interface, and the documentation wouldn't need to
point out the inconsistency anymore.

Reply via email to