This is the mail archive of the 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] PR 57543


On 05/30/2014 04:41 PM, Jason Merrill wrote:
On 05/30/2014 10:21 AM, Paolo Carlini wrote:
You also need to propagate the flag in a bunch of other places:
everywhere we call build_method_type_directly ought to cover it.
Agreed, I spotted a few places. What about build_function_type? I think
it's the same issue, right?

Right, I was just thinking that the relevant uses of build_function_type will be near calls to build_method_type_directly. :)
Indeed. Thus I have the below, which passes testing. Most of the changes are quite obvious, some maybe redundant but safe, I think. Exceptions: 1- I'm not sure cp_reconstruct_complex_type needs the changes, but probably cannot hurt.
2- Likewise change_return_type, for different reasons.
3- I understand Core/1227 as including the case of the late return type vs the parameters of generic lambdas, thus the rather heavy handed tweak to cp_parser_lambda_declarator_opt, which appears to work under the debugger (in the sense that for testcases like cpp1y/lambda-generic-cfun.C I checked that the on flag is still there in the eventual tsubst_function_type), but I need help about the conversion operator: should I do something in maybe_add_lambda_conv_op, thus propagate somehow from TREE_TYPE (callop)?!? In case, it would be easy, but I need help about the actual semantics we want (this isn't really about our impl, more about the specs of generic lambdas, sorry).

Finally, about !dependent_scope_p vs CLASS_TYPE_P, just wanted to mention, in case isn't obvious already, that build_this_parm has CLASS_TYPE_P which we badly want to be true if we want to avoid immediate ICEs in type_of_this_parm. Thus, it seems in fact the minimal check to use in tsusbt_function_type.



Attachment: patch_57543_7
Description: Text document

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