[cxx-abi-dev] Mangling sizeof
John H. Spicer
jhs at edg.com
Wed Mar 11 16:57:59 UTC 2009
On Mar 11, 2009, at 12:34 PM, Jason Merrill wrote:
> Jason Merrill wrote:
>> If we're dropping type stubs, that reintroduces the issue of what
>> to do with function parameters. I think it may still make sense to
>> use type stubs for them; the name of the parameter is not part of
>> the signature, and I don't think it's possible, given two
>> parameters of the same type, for it to make a difference which one
>> you use in a decltype/sizeof expression. Alternatively, we could
>> just introduce a mangling for "function parameter N". Which might
>> be simpler.
>
> On the other hand, I am sorry to give up the property that
>
> decltype (*(T*)0 + *(T*)0) f (T t);
> and
> auto f(T t) -> decltype (t + t)
>
> have the same signature. Maybe just use type stubs for function
> parameters and *(T*)0?
>
>
If your program uses both forms of that declaration it is already ill-
formed because the declarations are functionally equivalent but not
equivalent by the rules in 14.5.6.1.
John.
More information about the cxx-abi-dev
mailing list