This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: malloc function attribute



  In message <19991129194725.B1961@cygnus.com>you write:
  > On Mon, Nov 29, 1999 at 01:35:14AM -0500, Kaveh R. Ghazi wrote:
  > > QUESTION: should realloc and similar functions which could possibly
  > > return the same pointer more than once have this attribute?
  > 
  > No.  The attribute means "the function returns new unaliased storage".
Why do you think realloc doesn't do that?  Is it the example Mark posted?

If so and we decide that's a reasonable thing for realloc to do, then we need
to remove realloc from the list of malloc-like functions.

jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]