Mangling issue

Mark Mitchell mark at codesourcery.com
Wed Mar 27 19:38:28 UTC 2002


I have been presented with a corner case for which I do not believe
we have specified a mangling.

Consider:

  template <unsigned int> struct helper {};
  template <class T>
  void check( helper<sizeof(new T)> * );

The interesting point here is the "new T", which could, of course,
in general be "new(0) T(3)", or some such.  Our expression mangling
scheme does not say what to do here in the sense that it assumes
that each operator has fixed arity.  However, due to the existence
of placement new, new does not.  This also raises the issue of things
like:

  helper<sizeof(f(T(0)))>

and so forth; there's apparently so restriction on the standard in
having arbitrarily complex gnnk inside the "sizeof".

Thoughts?

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list