[cxx-abi-dev] Mangling issue
Daveed Vandevoorde
daveed at edg.com
Wed Mar 27 20:39:58 UTC 2002
Mark Mitchell wrote:
>
> 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)> * );
Ah yes... this is currently a popular Usenet C++ topic.
> 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?
Perhaps these should really be mangled with the "cl" operator:
X cl <function-name> <expr>* E
where <function-name> could be a mangled operator new if necessary?
Daveed
More information about the cxx-abi-dev
mailing list