https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109507
Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sjames at gcc dot gnu.org --- Comment #1 from Sam James <sjames at gcc dot gnu.org> --- UBSAN with GCC: ``` $ /tmp/foo /tmp/foo.c:4:7: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself 0 ``` UBSAN with Clang: ``` /tmp/foo.c:4:15: runtime error: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /tmp/foo.c:4:15 in 0 ```