PR c++/70522
* name-lookup.c (qualified_lookup_using_namespace): Look through
hidden names.
From-SVN: r235206
+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.
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;
--- /dev/null
+// PR c++/70522
+
+namespace A {
+ struct C {
+ friend void i();
+ };
+ namespace {
+ int i;
+ }
+}
+
+int main()
+{
+ return A::i;
+}