Commit 3ba065e8 by Jason Merrill Committed by Jason Merrill

re PR c++/70522 (Hidden friend functions block qualified name lookup into nested unnamed namespace)

	PR c++/70522

	* name-lookup.c (qualified_lookup_using_namespace): Look through
	hidden names.

From-SVN: r235206
parent a0176903
2016-04-19 Jason Merrill <jason@redhat.com>
PR c++/70522
* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.
2016-04-18 Michael Matz <matz@suse.de>
* class.c (build_vtable): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
......
......@@ -4647,8 +4647,9 @@ qualified_lookup_using_namespace (tree name, tree scope,
cp_binding_level_find_binding_for_name (NAMESPACE_LEVEL (scope), name);
if (binding)
{
found_here = true;
ambiguous_decl (result, binding, flags);
if (result->type || result->value)
found_here = true;
}
for (usings = DECL_NAMESPACE_USING (scope); usings;
......
// PR c++/70522
namespace A {
struct C {
friend void i();
};
namespace {
int i;
}
}
int main()
{
return A::i;
}
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