aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorVolker Reichelt <v.reichelt@netcologne.de>2008-04-09 06:32:45 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2008-04-09 06:32:45 +0000
commitde21c14559ce431d6fcc0b645712cff2a9c0dc0c (patch)
tree991e58cad4beac68ca119ad112449069d9814894 /gcc/cp
parentb72b0eba0434e128f24af10e3ed3d7d2791c5945 (diff)
downloadgcc-de21c14559ce431d6fcc0b645712cff2a9c0dc0c.zip
gcc-de21c14559ce431d6fcc0b645712cff2a9c0dc0c.tar.gz
gcc-de21c14559ce431d6fcc0b645712cff2a9c0dc0c.tar.bz2
* parser.c (cp_parser_template_parameter_list): Simplify.
From-SVN: r134126
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parser.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0b7fc4c..c344d56 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * parser.c (cp_parser_template_parameter_list): Simplify.
+
2008-04-07 James E. Wilson <wilson@tuliptree.org>
* pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 85295eb..fd05bee 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -9303,7 +9303,6 @@ cp_parser_template_parameter_list (cp_parser* parser)
while (true)
{
tree parameter;
- cp_token *token;
bool is_non_type;
bool is_parameter_pack;
@@ -9324,10 +9323,8 @@ cp_parser_template_parameter_list (cp_parser* parser)
parameter_list = chainon (parameter_list, err_parm);
}
- /* Peek at the next token. */
- token = cp_lexer_peek_token (parser->lexer);
- /* If it's not a `,', we're done. */
- if (token->type != CPP_COMMA)
+ /* If the next token is not a `,', we're done. */
+ if (cp_lexer_next_token_is_not (parser->lexer, CPP_COMMA))
break;
/* Otherwise, consume the `,' token. */
cp_lexer_consume_token (parser->lexer);