]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/15946 (Unhelpful error message when "typename" is omitted)
authorJason Merrill <jason@redhat.com>
Fri, 6 Nov 2009 21:18:42 +0000 (16:18 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 6 Nov 2009 21:18:42 +0000 (16:18 -0500)
commite1faa105c10af6f990e97a137187e04b21addbb7
tree1fe0df5266124ea89ffc21c4d73fd145d1248d5c
parent3c3905fc17fbaad4a0a3753fb166161154119e0b
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
gcc/cp/ChangeLog
gcc/cp/cxx-pretty-print.c
gcc/cp/error.c
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/error36.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/error26.C
gcc/testsuite/g++.old-deja/g++.other/typename1.C