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]

C++ PATCH for c++/79508 (lookup error with member template)


My patch to limit template lookup after -> and . to class templates
sets parser->context->object_type even for a dependent object
expression, so that we know that there was one.  This is normally
cleared in cp_parser_lookup_name, but cp_parser_template_name was
optimizing away the call to that function for set_default, so we lost
this important side-effect, and so when we went to look up
random_positive we thought we were still looking up the name in object
scope.  Fixed by preserving the side-effect even when we don't make
the call.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: 79508.diff
Description: Text document


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