G
Guest
7.20.3#1
[...] If the size of the space requested is
zero, the behavior is implementation-defined: either a null
pointer is returned, or the behavior is as if the size were
some nonzero value, except that the returned pointer shall
not be used to access an object.
Then the ??alloc() functions are described in 7.20.3.* .
Does the above quote's "either, or" apply to all the ??alloc() functions
*together* or *separately*?
Example:
In GNU libc malloc(0)!=NULL, but realloc(..., 0)==NULL. Is this
compliant?
TIA
[...] If the size of the space requested is
zero, the behavior is implementation-defined: either a null
pointer is returned, or the behavior is as if the size were
some nonzero value, except that the returned pointer shall
not be used to access an object.
Then the ??alloc() functions are described in 7.20.3.* .
Does the above quote's "either, or" apply to all the ??alloc() functions
*together* or *separately*?
Example:
In GNU libc malloc(0)!=NULL, but realloc(..., 0)==NULL. Is this
compliant?
TIA