You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, adding a NULL pointer and a 0 integer is no longer undefined behaviour. clang's UBSAN should therefore no longer report a "runtime error" about it.
How to reproduce:
Save this file as n3322-1.c:
/* This program exercises functionality allowed by
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3322.pdf */
#include <stddef.h>
int main ()
{
char *volatile p1 = NULL;
char *volatile p2 = NULL;
ptrdiff_t n = p1 - p2;
char *q = p1 + n;
(void) q;
}