This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Aliasing violation generated by fold_builtin_memcmp?
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dberlin at dberlin dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 30 Sep 05 11:20:53 EDT
- Subject: Re: Aliasing violation generated by fold_builtin_memcmp?
Uh, CAN_ALIAS_ALL seems like a very bad hack then.
You should simply be creating a pointed-to type that aliases set 0, and
using that for the pointed to type.
That is, after all, what alias set 0 is for.
That's easy enough for integer types, but creating multiple record types
means duplicating lots of fields and layouts and is, in general, a mess.
What's special here is the pointer type, not the underlying type.