3 ms·
How would that be a compiler bug? Assuming g() is never called with a NULL pointer, this code should not produce any compile-time errors: int f(int *x)
by jjnoakes 9y ago
How would that be a compiler bug? Assuming g() is never called with a NULL pointer, this code should not produce any compile-time errors:
int f(int *x)
{
if (x == NULL) return 0;
return *x;
}
int g(int *p)
{
return (*p) + f(p);
}