[Bug sanitizer/63806] #UBSAN ignores signed char possible overflow
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 10 13:41:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63806
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
No, narrowing conversion is implementation defined, and gcc defines that to the
modulo 2^N wrapping, so this is not undefined behavior, and furthermore,
something you'd complain about in pretty much all the code (there is no
difference between implicit and explicit narrowing cast).
More information about the Gcc-bugs
mailing list