3 ms·
While the situation with realloc() is unfortunate, it is also not difficult to write a wrapper that does what the author wants. I’ve done that before, because i
by layer8 4y ago
While the situation with realloc() is unfortunate, it is also not difficult to write a wrapper that does what the author wants. I’ve done that before, because it has long been known that not all realloc() implementations conform to the (prior) C standard. One can furthermore assume that existing implementations won’t change their behavior just because C23 made it UB.
- p0nce 4y agoHonestly I'm happy the C standard now address how realloc behaves in detail. It was already hard before, and now it's documented.