This is the mail archive of the 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]
Other format: [Raw text]

Re: [tree-ssa] mainline->branch merge status

Richard Henderson <> writes:

> On Fri, Jan 30, 2004 at 12:25:28AM +0100, Andreas Schwab wrote:
>> > So does the other way;  *(void **)__o->next_free = ... is exactly what you
>> > can't do.
>> I don't follow.  __o->next_free is a character pointer, thus can alias all
>> other pointers.
> No, that's not correct.  "char" can alias any other data; "char *" is
> not so unconstrained.  The code above is in fact broken.

I still don't understand.  Aliasing is a property of pointers, not of
numbers, isn't it?  Thus we have "__o->next_free", which is "char *" and
"(void **)__o->next_free", which is "void **".  The former can be an
alias of the latter, thus storing through the latter can change the
contents of the former.  Did I miss something?


Andreas Schwab, SuSE Labs,
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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