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:
| > 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 :-)
Yes, that use is rather marginal in my experience and is rather
involved -- when done correctly. But nobody knows what C programmers
do. And I don't know how that impacts on the aliasing algorithm.
| (PS message transmitted, because the first time I slipped up and it
| was not properly threaded)
:-)
-- Gaby