From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3CA4D3857B98; Mon, 11 Sep 2023 22:11:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3CA4D3857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694470270; bh=mJ74jCm7PKIMLoPVv3OZtXOnIuttkkrPCF5S1HwlSsE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TMQFjcSHWjCdcqSy6nOrrmopOchgYWwJ6+saSdeFY0dLmsqhl8gJW8bOhAZFF6RLi q9fSbaRimbBm9ZpW8WtXEiTKilEO9DXD/ItB7KdZGMI8+5hKGOrpkkwqfv3M/aNzu3 SmEi4EEJz0PQZgdU0b1npXDAMkr6f7lrktw1MIFc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106310] [11 Regression] lookup after this-> seems wrong for dependent lookup since r12-6754-g30f2c22def739211 Date: Mon, 11 Sep 2023 22:11:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106310 --- Comment #17 from CVS Commits --- The releases/gcc-11 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:506d5f399bef7f2d8c48fd83d853c6ff7811a226 commit r11-10983-g506d5f399bef7f2d8c48fd83d853c6ff7811a226 Author: Jason Merrill Date: Wed Jul 26 10:39:34 2023 -0400 c++: member vs global template [PR106310] For backward compatibility we still want to allow patterns like this->A::foo, but the template keyword in a qualified name is specifically to specify that a dependent name is a template, so don't l= ook in the enclosing scope at all. Also fix handling of dependent bases: if member lookup in the current instantiation fails and we have dependent bases, the lookup is dependen= t. We were already handling that for the case where lookup in the enclosing scope also fails, but we also want it to affect that lookup itself. PR c++/106310 gcc/cp/ChangeLog: * parser.c (cp_parser_template_name): Skip non-member lookup after the template keyword. (cp_parser_lookup_name): Pass down template_keyword_p. gcc/testsuite/ChangeLog: * g++.dg/template/template-keyword4.C: New test.=