Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Being implementation defined is hardly well defined.


Well, it's the return value in realloc(ptr, 0) case that is implementation-specific, but its behavior _is_ well-defined - it is expected to "deallocate the old object".

My point was that in reality the behavior varies. "Undefined" in a common tongue sense, not in the terms of the C standard.


No... maybe? It's probably arguable, even if it's not an interesting argument.

Either way, realloc's behaviour is well-defined when the pointer is null.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: