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

Jason Merrill jason at redhat.com
Fri Oct 31 21:39:59 UTC 2008


Jason Merrill wrote:
> Mark Mitchell wrote:
>> Or even things like
>> determining that the type is "void ()(T[3])" vs. "void ()(T*)".

...or the somewhat similar issue of how hard we should work at 
propagating describable types through complex expressions.  I want to 
handle *(T*)..., but is it worth handling things like ((*T)...) + 5?  Or 
"foo ? (T)bar : (T)baz"?  I'm not sure.

Currently g++ doesn't bother propagating types in situations like this 
where we *could* figure out what the describable type is, but don't bother.

Perhaps a specified subset is the right way to go after all.  Which 
would bring us back to my earlier list, which I'll update here:

lvalue forms:

variable, parameter, function name
member of the current instantiation
*exp (where type of exp is known to be pointer to something)

rvalue forms:

enumerator or template non-type parameter name
T(args)
*_cast<T>(expr)
literals
member of the current instantiation
new?
sizeof?
alignof?
&expr, where the subexpression has one of these types?

Any other opinions?

Jason



More information about the cxx-abi-dev mailing list