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] |
Hi, On 07/15/2014 11:46 PM, Jason Merrill wrote:
You need to call resolve_nondeduced_context at some point. This doesn't seem to be the right place, since you also want to handle code like "if (foo<void>)". Maybe in resolve_address_of_overloaded_function just before the error?Thanks, that helps (certainly resolve_nondeduced_context handles well the TEMPLATE_ID_EXPRs with which we are concerned, and, well, it's reassuring that decay_conversion calls it first).
In practice, both for the original testcase and for a conditional (and in more cases, eg conditional expressions), what happens is that perform_implicit_conversion_flags is called, which, when implicit_conversion fails, calls instantiate_type (and then resolve_address_of_overloaded_function) only to get a good error message. Thus, would it make sense to use resolve_nondeduced_context in perform_implicit_conversion_flags itself?!? Conservatively, only when the target type is a boolean_type_node, maybe? I tested the below.
Thanks again, Paolo.
Attachment:
patch_draft_50961_2
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |