This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to special_function_p
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch to special_function_p
- From: Jason Merrill <jason at cygnus dot com>
- Date: 03 Mar 2000 09:24:45 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200003031628.LAA14869@caip.rutgers.edu>
>>>>> Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
> Is even malloc safe? What if I do:
>> foo = malloc(10);
>> [...]
>> free(foo);
>> [...]
>> bar = malloc(10);
> Isn't it possible that malloc returns the same address here?
> (Or does the intervening call to free() block the aliasing
> optimization?)
I believe that it does; any references to the old object are invalidated by
that call.
Jason