Commit 932f48ac by Nathan Sidwell Committed by Nathan Sidwell

Reimplement unqualified namespace lookup.

	gcc/cp/
	Reimplement unqualified namespace lookup.
	* name-lookup.c (name_lookup::using_pair)
	name_lookup::using_queue): New typedefs.
	(name_lookup::queue_namespace, name_lookup::do_queue_usings,
	name_lookup::queue_usings): New.
	(name_lookup::search_unqualified): New.
	(merge_functions, same_entity_p, ambiguous_decl)
	unqualified_namespace_lookup_1, unqualified_namespace_lookup,
	lookup_using_namespace): Delete.
	(lookup_name_real_1): Adjust.

	gcc/testsuite/
	* g++.dg/lookup/using17.C: Adjust diagnostics.

From-SVN: r248465
parent a10f9a2e
2017-05-25 Nathan Sidwell <nathan@acm.org> 2017-05-25 Nathan Sidwell <nathan@acm.org>
Reimplement unqualified namespace lookup.
* name-lookup.c (name_lookup::using_pair,
name_lookup::using_queue): New typedefs.
(name_lookup::queue_namespace, name_lookup::do_queue_usings,
name_lookup::queue_usings): New.
(name_lookup::search_unqualified): New.
(merge_functions, same_entity_p, ambiguous_decl,
unqualified_namespace_lookup_1, unqualified_namespace_lookup,
lookup_using_namespace): Delete.
(lookup_name_real_1): Adjust.
Reimplement qualified namespace lookup. Reimplement qualified namespace lookup.
* name-lookup.c (name_lookup::flags): New member. Adjust ctor. * name-lookup.c (name_lookup::flags): New member. Adjust ctor.
(name_lookup::ambiguous, name_lookup::add_value, (name_lookup::ambiguous, name_lookup::add_value,
......
2017-05-25 Nathan Sidwell <nathan@acm.org>
* g++.dg/lookup/using17.C: Adjust diagnostics.
2017-05-25 Martin Sebor <msebor@redhat.com> 2017-05-25 Martin Sebor <msebor@redhat.com>
* gcc.dg/overflow-warn-9.c: Adjust expected warnings to avoid false * gcc.dg/overflow-warn-9.c: Adjust expected warnings to avoid false
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
// { dg-do compile } // { dg-do compile }
namespace M { namespace M {
struct S {}; // { dg-message ".struct M::S." "candidate 2" } struct S {}; // { dg-message "candidates are: .struct M::S." "candidate 1" }
} }
int S; int S;
struct S {}; // { dg-message "candidates are: .struct S." "candidate 1" } struct S {}; // { dg-message ".struct S." "candidate 2" }
using namespace M; using namespace M;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment