This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: malloc attributes and realloc
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, gdr at integrable-solutions dot net
- Cc: drow at mvista dot com, gcc at gcc dot gnu dot org
- Date: Thu, 1 Jan 2004 19:14:21 -0500 (EST)
- Subject: Re: malloc attributes and realloc
> 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.
Yes, that's what I mean by pointer punning, here you are taking a pointer
value, converting it to a string, and then converting it back to a pointer.
So this is indeed different.
I had always thought that C would allow compacting garbage collection in the
absence of pointer punning. This is the first time I have seen a suggestion
otherwise, and it's rather a marginal case :-)