summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
authorgdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-29 07:00:32 +0000
committergdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-29 07:00:32 +0000
commitafb1a1119e5951ad9ad9fb5f5531266c472d658f (patch)
tree57164a0efc439068c173e46bac935af2b8cd2843 /gcc/cp/error.c
parentd291d8b244efc66333a228e5013a5afd80c87f6d (diff)
downloadgcc-afb1a1119e5951ad9ad9fb5f5531266c472d658f.tar.gz
PR c++/11811
* cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New function. * cxx-pretty-print.h: Declare. * error.c (dump_template_parameter): Use it. (dump_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70905 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 9aeb555c615..aa7534ed086 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -227,7 +227,7 @@ dump_template_parameter (tree parm, int flags)
else if (DECL_NAME (p))
pp_tree_identifier (cxx_pp, DECL_NAME (p));
else
- pp_identifier (cxx_pp, "<template default argument error>");
+ pp_cxx_canonical_template_parameter (cxx_pp, TREE_TYPE (p));
}
else
dump_decl (p, flags | TFF_DECL_SPECIFIERS);
@@ -384,7 +384,7 @@ dump_type (tree t, int flags)
if (TYPE_IDENTIFIER (t))
pp_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
else
- pp_identifier (cxx_pp, "<anonymous template template parameter>");
+ pp_cxx_canonical_template_parameter (cxx_pp, t);
break;
case BOUND_TEMPLATE_TEMPLATE_PARM:
@@ -402,7 +402,8 @@ dump_type (tree t, int flags)
if (TYPE_IDENTIFIER (t))
pp_tree_identifier (cxx_pp, TYPE_IDENTIFIER (t));
else
- pp_identifier (cxx_pp, "<anonymous template type parameter>");
+ pp_cxx_canonical_template_parameter
+ (cxx_pp, TEMPLATE_TYPE_PARM_INDEX (t));
break;
/* This is not always necessary for pointers and such, but doing this