diff options
author | Jason Merrill <jason@redhat.com> | 2009-11-06 16:18:42 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-11-06 16:18:42 -0500 |
commit | e1faa105c10af6f990e97a137187e04b21addbb7 (patch) | |
tree | 1fe0df5266124ea89ffc21c4d73fd145d1248d5c /gcc/cp/cxx-pretty-print.c | |
parent | 3c3905fc17fbaad4a0a3753fb166161154119e0b (diff) | |
download | gcc-e1faa105c10af6f990e97a137187e04b21addbb7.zip gcc-e1faa105c10af6f990e97a137187e04b21addbb7.tar.gz gcc-e1faa105c10af6f990e97a137187e04b21addbb7.tar.bz2 |
re PR c++/15946 (Unhelpful error message when "typename" is omitted)
PR c++/15946
* parser.c (cp_parser_check_template_parameters): Don't talk about
specialization at function scope.
(cp_parser_diagnose_invalid_type_name): Handle dependent scope.
(cp_parser_parse_and_diagnose_invalid_type_name): Likewise.
(cp_parser_expression_statement): Suggest typename.
* error.c (dump_decl) [SCOPE_REF]: Print the type here.
(dump_expr) [SCOPE_REF]: Call it.
(dump_type) [UNBOUND_CLASS_TEMPLATE]: Check TFF_UNQUALIFIED_NAME.
* cxx-pretty-print.c (pp_cxx_unqualified_id): Print class template
args.
From-SVN: r153978
Diffstat (limited to 'gcc/cp/cxx-pretty-print.c')
-rw-r--r-- | gcc/cp/cxx-pretty-print.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 1d7f9cf2..4851af9 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -200,6 +200,12 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t) case TYPENAME_TYPE: case UNBOUND_CLASS_TEMPLATE: pp_cxx_unqualified_id (pp, TYPE_NAME (t)); + if (CLASS_TYPE_P (t) && CLASSTYPE_USE_TEMPLATE (t)) + { + pp_cxx_begin_template_argument_list (pp); + pp_cxx_template_argument_list (pp, CLASSTYPE_TI_ARGS (t)); + pp_cxx_end_template_argument_list (pp); + } break; case BIT_NOT_EXPR: |