diff options
author | Dodji Seketeli <dodji@redhat.com> | 2011-01-28 23:35:59 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@gcc.gnu.org> | 2011-01-29 00:35:59 +0100 |
commit | bc44baadce0f8c990e87b6b8876756f695e28326 (patch) | |
tree | f6331eb712bb93cb702bf05a9c41335d882dacb7 /gcc/cp/parser.c | |
parent | 46adbf0c6b9b8019e1ee4586c8b85096f102e8b3 (diff) | |
download | gcc-bc44baadce0f8c990e87b6b8876756f695e28326.tar.gz |
re PR preprocessor/47311 ([C++0x] ICE in tsubst @cp/pt.c:10502)
Fix PR c++/47311
gcc/cp/
PR c++/47311
* cp-tree.h (fixup_template_parms): Declare.
* pt.c (end_template_parm_list): Do not fixup template parms here.
(fixup_template_parms): Remove static. Fix typo in the
comments. Remove useless code statement.
(fixup_template_parm): For a template template parameter, fixup
its attributes before fixing up its type.
* parser.c
(cp_parser_template_declaration_after_export): After parsing
template parameters fixup their types.
gcc/testsuite/
PR c++/47311
* g++.dg/template/param2.C: New test.
From-SVN: r169377
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 41f82ac4747..2b6a752629c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -19919,8 +19919,11 @@ cp_parser_template_declaration_after_export (cp_parser* parser, bool member_p) parameter_list = NULL_TREE; } else - /* Parse the template parameters. */ - parameter_list = cp_parser_template_parameter_list (parser); + { + /* Parse the template parameters. */ + parameter_list = cp_parser_template_parameter_list (parser); + fixup_template_parms (); + } /* Get the deferred access checks from the parameter list. These will be checked once we know what is being declared, as for a |