This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16965] [3.4/3.5 regression] Confusing mismatch in error messages
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2004 17:32:43 -0000
- Subject: [Bug c++/16965] [3.4/3.5 regression] Confusing mismatch in error messages
- References: <20040810143044.16965.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-08-17 17:32 -------
Subject: Bug 16965
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-08-17 17:32:37
Modified files:
gcc/cp : ChangeLog cp-tree.h name-lookup.c parser.c pt.c
semantics.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/parse: error17.C
Log message:
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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4277&r2=1.4278
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1030&r2=1.1031
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.81&r2=1.82
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.236&r2=1.237
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.905&r2=1.906
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.423&r2=1.424
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4149&r2=1.4150
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error17.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16965