An alias can't be declared with a qualified-id in actual code, but in
diagnostics we want to know which scope it belongs to, and I think a
nested-name-specifier is the best way to provide that.
gcc/cp/ChangeLog:
* error.cc (dump_decl): Check TFF_UNQUALIFIED_NAME.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-1.C: Expect qualified name.
|| flags & TFF_CLASS_KEY_OR_ENUM))
{
pp_cxx_ws_string (pp, "using");
+ if (! (flags & TFF_UNQUALIFIED_NAME))
+ dump_scope (pp, CP_DECL_CONTEXT (t), flags);
dump_decl (pp, DECL_NAME (t), flags);
pp_cxx_whitespace (pp);
pp_cxx_ws_string (pp, "=");
struct A {
using A = int; // { dg-error "11:ISO C\\+\\+ forbids nested type .A." }
-// { dg-error "11:.using A = int. has the same name as" "" { target c++11 } .-1 }
+// { dg-error "11:.using A::A = int. has the same name as" "" { target c++11 } .-1 }
};