Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Subject: Re: [cxx-abi-dev] Mangling late-specified return types/decltype
  • From: Jason Merrill <jason@xxxxxxxxxx>
  • Date: Fri, 31 Oct 2008 17:39:59 -0400

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