Comment

Comment by beeforpork

> Support for calling realloc() with zero size (the behavior becomes undefined)

OMG! Please do not add more undefined behaviour!

We really need less UB, not more! What was wrong with 'implementation defined' as in C17? UB means that code that exists will now break if a new compiler decides that it can be smart. And we know how inventive this can get, right? Like removal of 'if(new_size==0) {...}' if the compiler can prove that 'new_size' went into 'realloc' before.

parent beeforpork 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton