2 ms·
There's a little more reasoning in the associated C2x proposal N2464 [0]: > [DR 400] was resolved by loosening the requirements in the standard to allow for th
by aw1621107 3y ago
There's a little more reasoning in the associated C2x proposal N2464 [0]:
> [DR 400] was resolved by loosening the requirements in the standard to allow for the existing range of implementations and included in C17.
> N2438 Clarification Request requested further clarification [...]
> Discussion at the Ithaca meeting and on the mailing list suggested that a call to realloc with a size of 0 be classified as undefined behavior.
> [snip]
> Classifying a call to realloc with a size of 0 as undefined behavior would allow POSIX to define the otherwise undefined behavior however they please.
[0]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2464.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2464.pdf
- veltas 3y agoYes but the well was poisoned by marking it for removal / obscelescent in the first place. Making it undefined behaviour is the next logical step after that.