This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12547] realloc(p, 0) violates C99
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 23 Feb 2015 12:19:02 +0000
- Subject: [Bug libc/12547] realloc(p, 0) violates C99
- Auto-submitted: auto-generated
- References: <bug-12547-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=12547
--- Comment #11 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The proposed TC for DR#400 (closed, presumably to be published in C11 TC2)
makes the standard say "If size is zero and memory for the new object is
not allocated, it is implementation-defined whether the old object is
deallocated. ... The realloc function returns a pointer to the new object
(which may have the same value as a pointer to the old object), or a null
pointer if the new object has not been allocated. ... Invoking realloc
with a size argument equal to zero is an obsolescent feature.".
Based on that conclusion about what realloc may do in this case, this
sounds like INVALID to me.
--
You are receiving this mail because:
You are on the CC list for the bug.