https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119716
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This is invalid testcase. E.g. replace return __builtin_dynamic_object_size (p, 1); with return 0; and try both gcc -fsanitize=undefined -g -O0 or clang -fsanitize=undefined -g -O0, both will diagnose it. Even when C2Y allows NULL + 0, it doesn't allow NULL + sizeof (size_t).