This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dberlin at dberlin dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 22 May 06 09:01:57 EDT
- Subject: Re: [PATCH] Repair TYPE_REF_CAN_ALIAS_ALL machinery
As a general statement, we shouldn't need TYPE_REF_CAN_ALIAS_ALL, we
handle the same thing in other languages without it.
No. Other languages don't have that concept. In C, (char *) is presumed
to alias to everything, but that's (as has been said) really an attribute
of "char", not the pointer: *all* pointers to char behave that way.
In Ada, we have the situation where we have a type T and most pointers to
T are fine, but *one particular* type that points to T has this behavior.
That's a very different model.