aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-07-05 17:05:47 -0400
committerJason Merrill <jason@redhat.com>2022-07-06 00:40:16 -0400
commit656c0212909bc91b1025aa12774d981adb531b4c (patch)
tree72186a6e8656750e48a23437aeaad13398ce9196 /gcc/cp/parser.cc
parentd1f3a3fffeb40e646ec5a643783cd753fa7def33 (diff)
downloadgcc-656c0212909bc91b1025aa12774d981adb531b4c.zip
gcc-656c0212909bc91b1025aa12774d981adb531b4c.tar.gz
gcc-656c0212909bc91b1025aa12774d981adb531b4c.tar.bz2
c++: dependent conversion operator lookup [PR106179]
This testcase demonstrates that my assumption that we would only be interested in a class template lookup if the template-id is followed by :: was wrong. PR c++/106179 PR c++/106024 gcc/cp/ChangeLog: * parser.cc (cp_parser_lookup_name): Remove :: requirement for using unqualified lookup result. gcc/testsuite/ChangeLog: * g++.dg/template/operator16.C: New test.
Diffstat (limited to 'gcc/cp/parser.cc')
-rw-r--r--gcc/cp/parser.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index df657a3..5cd6a52 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -30738,10 +30738,6 @@ cp_parser_lookup_name (cp_parser *parser, tree name,
looking at a template arg list. */
if (!cp_parser_skip_entire_template_parameter_list (parser))
decl = NULL_TREE;
- /* And only use the unqualified lookup if we're looking at ::. */
- if (decl
- && !cp_lexer_next_token_is (parser->lexer, CPP_SCOPE))
- decl = NULL_TREE;
}
/* If we know we're looking for a type (e.g. A in p->A::x),