From 0229b692f4cba2d23b960284c79384b6f5b2309a Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 16 Nov 2009 08:31:26 +0000 Subject: re PR c++/32056 (Storage classes on template parameters) cp/ 2009-11-16 Paolo Carlini PR c++/32056 * decl.h (enum decl_context): Add TPARM enumerator. * decl.c (grokdeclarator): Per 14.1/2, error out if a storage class is specified in a template parameter declaration. * parser.c (cp_parser_template_parameter): Call grokdeclarator with TPARM as third argument. testsuite/ 2009-11-16 Paolo Carlini PR c++/32056 * testsuite/g++.dg/template/error44.C: New. From-SVN: r154198 --- gcc/cp/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cp/parser.c') diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 05def24..3a4b409 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10508,7 +10508,7 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type, parm = grokdeclarator (parameter_declarator->declarator, ¶meter_declarator->decl_specifiers, - PARM, /*initialized=*/0, + TPARM, /*initialized=*/0, /*attrlist=*/NULL); if (parm == error_mark_node) return error_mark_node; -- cgit v1.1