From de21c14559ce431d6fcc0b645712cff2a9c0dc0c Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Wed, 9 Apr 2008 06:32:45 +0000 Subject: [PATCH] * parser.c (cp_parser_template_parameter_list): Simplify. From-SVN: r134126 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/parser.c | 7 ++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0b7fc4ccc84..c344d56081c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2008-04-09 Volker Reichelt + + * parser.c (cp_parser_template_parameter_list): Simplify. + 2008-04-07 James E. Wilson * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 85295eb743c..fd05bee6872 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); -- 2.30.2