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: GCC Cauldron: Notes from the C++ ABI BOF


Hi,

On Wed, 11 Jul 2012, Ian Lance Taylor wrote:

> We will modify g++ to support a type attribute indicating the version of 
> the type, as a string.  This type attribute will be inherited by any 
> other type that uses it, as a class/struct member or via inheritance.  
> Type attributes will be concatenated as needed.  This type attribute 
> will then be used in the mangled name of any function that takes a 
> parameter of a type with an attribute or returns a type with an 
> attribute.  The type attribute will also be used in the mangled name of 
> any global variable whose type has an attribute.

There are some technical details that need to be decided: Should every 
type affected have a different tag, or just one common (e.g. all of c++11 
types that differ would get "_cxx11"?  Then, should the set of these tags 
if there are multiple be regarded as unordered set?  This would allow 
canonicalizing the concatenation of such tags (order and merge) and 
decrease the length increase in mangled names.  But it would imply that no 
function ever takes a mix of new and old types (because it would have the 
same mangling as one taking only new ones).  If different types have 
different tags it would only imply that no function takes a mixture of new 
and old equivalent types (e.g. a c++11 list _and_ a c++98 list), which 
seems a reasonable restriction.

The question boils down to what we want to add to the mangled name of a 
type looking like so (or an function taking the equivalent number of 
arguments):

class X {
  std::list l1;  // all new lists
  std::list l2;
  std::list l3;
  std::list l4;
  std::pair p1;  // the old pair
};


Ciao,
Michael.


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