re PR c++/16965 (Confusing mismatch in error messages)
authorMark Mitchell <mark@codesourcery.com>
Tue, 17 Aug 2004 17:32:37 +0000 (17:32 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 17 Aug 2004 17:32:37 +0000 (17:32 +0000)
commit8f78f01f72f21078e0169abe6c214e62a1414c93
tree697ec760d74298d58c6bb50a122c01bbfe86c05b
parent13a98f14d2c358714567c8284f7eefa419f2b076
re PR c++/16965 (Confusing mismatch in error messages)

PR c++/16965
* cp-tree.h (qualified_name_lookup_error): Add parameter.
* name-lookup.c (do_class_using_decl): Restrict set of entities
passed to cp_emit_debug_info_for_using more carefully.
(lookup_qualified_name): Allow lookup_member to return sets of
ambiguous entries.
* parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
(cp_parser_primary_expression): Handle ambiguous lookups.
(cp_parser_template_name): Adjust use of cp_parser_lookup_name.
(cp_parser_template_argument): Likewise.
(cp_parser_elaborate_type_specifier): Likewise.
(cp_parser_namespace_name): Likewise.
(cp_parser_class_name): Likewise.
(cp_parser_lookup_name_simple): Likewise.
* pt.c (tsubst_qualified_id): Handle ambiguous results.
(tsubst_expr): Likewise.
* semantics.c (qualified_name_lookup_error): Add decl paramter.
For ambiguous lookups, print candidates.

PR c++/16965
* g++.dg/parse/error17.C: New test.

From-SVN: r86137
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/error17.C [new file with mode: 0644]