[cxx-abi-dev] Mangling of sizeof when applied to a type

Mark Mitchell mark at codesourcery.com
Tue Jul 2 03:22:41 UTC 2002



--On Thursday, June 27, 2002 03:01:39 PM -0700 Mark Mitchell 
<mark at codesourcery.com> wrote:

> The ABI document does not currently specify the mangling of sizeof when
> applied to a type.  For example:
>
>   template <typename X>
>   void f(S<sizeof(X)>);
>
> When instantiating f, we need a mangling for the argument type in the
> uninstantiated form.
>
> To that end, I suggest we introduce a new operator "st" which takes one
> operand, but which is a type, rather than an expression.
>
> This changes the mangling grammar like so:
>
>   <expression> ::= st <type>
>
> It's better not to overload sz since that will make demangling harder.
>
> If I don't hear objections in the next few days, I'll make this change
> to the ABI document.

I didn't hear objections so I did make the change (and implemented said
change in G++).

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




More information about the cxx-abi-dev mailing list