This is the mail archive of the gcc@gcc.gnu.org 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: may_alias attribute and type identity (PR c++/34935)


On Thu, Jan 24, 2008 at 04:06:47PM +0100, Richard Guenther wrote:
> On Jan 24, 2008 3:58 PM, Doug Gregor <doug.gregor@gmail.com> wrote:
> The middle-end type system (useless_type_conversion_p) says that
> pointers to int and pointers to int __attribute__((may_alias)) are
> distinct (you can't use one in place of the other without changning
> semantics) - because the pointed to types have different alias sets.
> 
> Now, for rvalues that doesn't matter, so indeed a value of type
> int and a value of type int __attribute__((may_alias)) can be used
> in place of each other.  So I stand corrected and they should indeed
> have the same canonical type.

See also http://gcc.gnu.org/PR34936.  Is int __attribute__((may_alias))
supposed to be mangled the same as int?  And if so, it should for cp/call.c
purposes be treated the same as well.

	Jakub


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