On Thursday, 27 May 2021 17:18:58 CEST Jason Merrill wrote: > On 5/26/21 5:27 PM, Matthias Kretz wrote: > > From: Matthias Kretz <kr...@kde.org> > > > > 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. > > > > + if (! (flags & TFF_UNQUALIFIED_NAME)) > > + dump_scope (pp, CP_DECL_CONTEXT (TYPE_NAME (t)), flags); > > You can use "decl" instead of "TYPE_NAME (t)" here. > > OK with that change.
Updated patch below. From: Matthias Kretz <kr...@kde.org> 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. --- gcc/cp/error.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 3d5eebd4bcd..ae78b10c7b2 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; }