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)


Richard Guenther wrote:

I don't think that may_alias is an attribute that needs to be mangled, as its
semantics affect code generation but not interfacing.  For example:

void foo(int *x __attribute__((may_alias));

and

void foo(int *x);

are not distinguishable at the point of the caller -- but only affect code
generation in foo() itself.

But only one direction of conversion makes sense implicitly: the usual contra-variance applies. And, S<int *> and S<int *x __attribute__((may_alias))> are different types, and therefore must be mangled differently; you certainly can't assume silent conversion between them.


--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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