realloc(ptr, 0) in C23 – now what?
According to the change log of C23, proposal n2464 was voted-in and implemented, making realloc(ptr, 0)
explicitly undefined behavior, whereas it was supposedly implementation-defined in previous standards. In the drafts, the specification of realloc
has been changed accordingly: (bold emphasis mine)