[cxx-abi-dev] Mangling late-specified return types/decltype

Jason Merrill jason at redhat.com
Fri Sep 5 20:09:06 UTC 2008


John H. Spicer wrote:
> On Sep 5, 2008, at 1:27 PM, Jason Merrill wrote:

>> I think we don't want to mangle it as a reference to a function 
>> parameter, but rather as a placeholder expression with the type of the 
>> parameter.  Perhaps sT <type>?
> 
> That might be okay, but I'm not sure what the advantage is.  You need to 
> be able to handle things like decltype(t.x + u.x) so you need to 
> represent expressions of which the parameter is component.

That doesn't seem like a problem; t.x would be represented as (T 
placeholder).x.  We already have a mangling for component ref.

Of course, we are already representing the parameter types in the 
mangled name, so it would be nice to avoid the (minor) duplication, but 
the problem is that the return type comes first in the mangled name.

Jason



More information about the cxx-abi-dev mailing list