This is the mail archive of the
mailing list for the glibc project.
Re: [RFC][PATCH v2] Add reallocarray function.
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Rich Felker <dalias at libc dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: RÃdiger Sonderfeld <ruediger at c-plusplus dot de>, libc-alpha at sourceware dot org
- Date: Mon, 19 May 2014 22:47:50 -0700
- Subject: Re: [RFC][PATCH v2] Add reallocarray function.
- Authentication-results: sourceware.org; auth=none
- References: <5379208F dot 8030000 at cs dot ucla dot edu> <2080621 dot 6fAB4UMNoY at descartes> <Pine dot LNX dot 4 dot 64 dot 1405191501120 dot 25418 at digraph dot polyomino dot org dot uk> <20140520020108 dot GV507 at brightrain dot aerifal dot cx>
Rich Felker wrote:
Not really related to this patch, but I think the comment about
__attribute_malloc__ that was copied from realloc is wrong. The new
and old pointers cannot alias
You're correct that the new and old pointers cannot alias, but I fear
that __attribute_malloc__ does not mean what you think it means. The
GCC documentation is *really* confusing in this area, unfortunately.