This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ Patch/RFC] PR 57092


Hi,

On 04/29/2013 04:48 PM, Jason Merrill wrote:
On 04/29/2013 05:05 AM, Paolo Carlini wrote:
in this 4.8/4.9 Regression, finish_decltype_type doesn't handle
ADDR_EXPR.

Hmm...we're seeing the regression because previously finish_decltype_type would have just returned the type of the template parameter so it wouldn't ever see the ADDR_EXPR at instantiation time. But we want to form a DECLTYPE_TYPE so that the mangling is correct. Perhaps the right solution is to handle this case specially in tsubst/DECLTYPE_TYPE: If id is true and the original expr is a TEMPLATE_PARM_INDEX, just instantiate the type of the template parm rather than its value.
thanks for your feedback. Are we sure that tsubst_copy_and_build, as called by tsubst/DECLTYPE_TYPE, can't return an ADDR_EXPR in other cases besides TEMPLATE_PARM_INDEX as input? I'm wondering if handling the additional TREE_CODE in finish_decltype_type isn't overall preferable (assuming we wouldn't end up soon handling all sorts of *_EXPR ;)

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]