Oct. 26, 2022
4:17 p.m.
Paul Eggert via tz said:
Presumably this is because the GCC maintainers are in the faction that says a null pointer cannot be used to pass a size-zero object to a library function. This is likely the same faction that says "char *p = NULL; return p + 0;" has undefined behavior.
I agree with them in both cases. There are no zero-sized objects in C. (This is C90 and C99; I dropped off WG14 in the early noughties.) -- Clive D.W. Feather | If you lie to the compiler, Email: clive@davros.org | it will get its revenge. Web: http://www.davros.org | - Henry Spencer Mobile: +44 7973 377646