From: Matthias Kretz Date: Thu, 27 May 2021 15:30:34 +0000 (+0200) Subject: c++: Add missing scope in typedef diagnostic [PR100763] X-Git-Tag: basepoints/gcc-13~7214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27e906d5bb2e46e59fe4aa137317f3c8d49ecb44;p=thirdparty%2Fgcc.git c++: Add missing scope in typedef diagnostic [PR100763] dump_type on 'const std::string' should not print 'const string' unless TFF_UNQUALIFIED_NAME is requested. gcc/cp/ChangeLog: PR c++/100763 * error.c: Call dump_scope when printing a typedef. --- diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 3d5eebd4bcd1..ae78b10c7b2e 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -501,6 +501,8 @@ dump_type (cxx_pretty_printer *pp, tree t, int flags) else { pp_cxx_cv_qualifier_seq (pp, t); + if (! (flags & TFF_UNQUALIFIED_NAME)) + dump_scope (pp, CP_DECL_CONTEXT (decl), flags); pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t)); return; }