4 ms·
Such behavior violates C89 (they later made it unspecified, likely to match the divergence): > If size is zero and ptr is not a null pointer, the object it poi
by LegionMammal978 3y ago
Such behavior violates C89 (they later made it unspecified, likely to match the divergence):
> If size is zero and ptr is not a null pointer, the object it points to is freed.
It also violates every version of the SUS and POSIX up to Issue 6 (they made it unspecified in Issue 7):
> If size is 0 and ptr is not a null pointer, the object pointed to is freed.
Going down to at least the 3rd edition of SVID:
> If size is zero and ptr is not a null pointer, the object pointed to is
freed.
- kazinator 3y agoWhat's obvious about all those Unix-related specifications is that they are not of BSD lineage.