3 ms·
A classic problem is code like this: printf("a=%p *a=%d", a, *a); if (a == NULL) return; An optimizing compiler will likely remove the NULL check comp
by TorKlingberg 10y ago
A classic problem is code like this:
printf("a=%p *a=%d", a, *a);
if (a == NULL) return;
An optimizing compiler will likely remove the NULL check completely because the printf above it has undefined behavior if a is NULL.