This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/63806] #UBSAN ignores signed char possible overflow
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Nov 2014 13:41:04 +0000
- Subject: [Bug sanitizer/63806] #UBSAN ignores signed char possible overflow
- Auto-submitted: auto-generated
- References: <bug-63806-4 at http dot gcc dot gnu dot org/bugzilla/>
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).