+2005-09-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/13377
+ * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
+ lookup_name_real on final parse.
+
2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/23586
bool is_type, bool is_template, bool is_namespace,
bool check_dependency)
{
+ int flags = 0;
tree decl;
tree object_type = parser->context->object_type;
if (name == error_mark_node)
return error_mark_node;
+ if (!cp_parser_parsing_tentatively (parser)
+ || cp_parser_committed_to_tentative_parse (parser))
+ flags |= LOOKUP_COMPLAIN;
+
/* A template-id has already been resolved; there is no lookup to
do. */
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
/*protect=*/0, is_type);
/* Look it up in the enclosing context, too. */
decl = lookup_name_real (name, is_type, /*nonclass=*/0,
- is_namespace,
- /*flags=*/0);
+ is_namespace, flags);
parser->object_scope = object_type;
parser->qualifying_scope = NULL_TREE;
if (object_decl)
else
{
decl = lookup_name_real (name, is_type, /*nonclass=*/0,
- is_namespace,
- /*flags=*/0);
+ is_namespace, flags);
parser->qualifying_scope = NULL_TREE;
parser->object_scope = NULL_TREE;
}
+2005-09-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+
+ PR c++/13377
+ * g++.dg/lookup/ambig4.C: New test.
+ * g++.dg/lookup/ambig5.C: New test.
+
2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/23639