Re: [cxx-abi-dev] Mangling sizeof
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cxx-abi-dev] Mangling sizeof
- To: Jason Merrill <jason@xxxxxxxxxx>
- Subject: Re: [cxx-abi-dev] Mangling sizeof
- From: "John H. Spicer" <jhs@xxxxxxx>
- Date: Wed, 11 Mar 2009 12:57:59 -0400
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.