diff options
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r-- | gcc/cp/error.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 25a05801622..239ff9ac07c 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -2331,7 +2331,10 @@ lang_decl_name (tree decl, int v, bool translate) reinit_cxx_pp (); pp_translate_identifiers (cxx_pp) = translate; - if (v == 1 && DECL_CLASS_SCOPE_P (decl)) + if (v == 1 + && (DECL_CLASS_SCOPE_P (decl) + || (DECL_NAMESPACE_SCOPE_P (decl) + && CP_DECL_CONTEXT (decl) != global_namespace))) { dump_type (CP_DECL_CONTEXT (decl), TFF_PLAIN_IDENTIFIER); pp_cxx_colon_colon (cxx_pp); |