This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
Robert Dewar <dewar@gnat.com> writes:
| Gabriel Dos Reis wrote:
| > dewar@gnat.com (Robert Dewar) writes:
|
| > Not really. As Joseph pointed out earlier, if you save the pointer
| > value in an array of unsigned char and latter do bits compare, you can
| > safely determine whether realloc returns the same pointer or not.
|
| Are you sure? Interestingly this one interpretation would make garbage
| collection in C impossible, are you sure that is the intent? Why?
I don't know why. But it is no different from grabbing some storage,
printing the value of its start on stdout and reading it back and use
it.
-- Gaby