[Bug c/50486] No warning at signed -> unsigned casting

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 11 12:51:19 GMT 2022


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

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Clang warns:

 <source>:16:18: warning: implicit conversion changes signedness: 'int' to
'enum e' [-Wsign-conversion]
        return a(-1);
               ~ ^~

Not sure why gcc doesn't but it should.


More information about the Gcc-bugs mailing list