aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.org>2008-01-15 22:58:02 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-01-15 22:58:02 +0000
commitcde7bfee90235e237a3c3eef8c0e746cc02a63ee (patch)
treecc255bbc6ceba3dae4c0d95fab6d85723a78129e /gcc
parent90469382c09fb5ed5602c30490d117aff172f7c2 (diff)
downloadgcc-cde7bfee90235e237a3c3eef8c0e746cc02a63ee.zip
gcc-cde7bfee90235e237a3c3eef8c0e746cc02a63ee.tar.gz
gcc-cde7bfee90235e237a3c3eef8c0e746cc02a63ee.tar.bz2
parser.c (cp_parser_template_parameter): Fix C90 issue with mixing declaration and code.
2008-01-15 Andreas Tobler <a.tobler@schweiz.org> * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing declaration and code. Update copyright year. From-SVN: r131555
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/parser.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cb78daa..8582460 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
+
+ * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
+ declaration and code. Update copyright year.
+
2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
PR c++/34399
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 6462f35..e661448 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -1,6 +1,6 @@
/* C++ Parser.
Copyright (C) 2000, 2001, 2002, 2003, 2004,
- 2005, 2007 Free Software Foundation, Inc.
+ 2005, 2007, 2008 Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC.
@@ -9318,6 +9318,7 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type,
{
cp_token *token;
cp_parameter_declarator *parameter_declarator;
+ cp_declarator *id_declarator;
tree parm;
/* Assume it is a type parameter or a template parameter. */
@@ -9408,7 +9409,7 @@ cp_parser_template_parameter (cp_parser* parser, bool *is_non_type,
cp_lexer_consume_token (parser->lexer);
/* Find the name of the parameter pack. */
- cp_declarator *id_declarator = parameter_declarator->declarator;
+ id_declarator = parameter_declarator->declarator;
while (id_declarator && id_declarator->kind != cdk_id)
id_declarator = id_declarator->declarator;