This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Simplify c_parser_next_token_is_keyword
- From: Volker Reichelt <v dot reichelt at netcologne dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Mar 2008 22:28:18 +0100 (CET)
- Subject: [PATCH] Simplify c_parser_next_token_is_keyword
The following trivial patch simplifies c_parser_next_token_is_keyword
(so that it looks like c_parser_next_token_is a couple of lines above).
Bootstrapped and regtested on i686-pc-linux-gnu.
Ok for mainline?
Regards,
Volker
:ADDPATCH C:
2008-03-28 Volker Reichelt <v.reichelt@netcologne.de>
* c-parser.c (c_parser_next_token_is_keyword): Simplify.
===================================================================
--- gcc/c-parser.c 2006-08-06 01:08:54 +0200
+++ gcc/c-parser.c 2006-08-19 21:16:51 +0200
@@ -443,12 +443,7 @@ c_parser_next_token_is_not (c_parser *pa
static inline bool
c_parser_next_token_is_keyword (c_parser *parser, enum rid keyword)
{
- c_token *token;
-
- /* Peek at the next token. */
- token = c_parser_peek_token (parser);
- /* Check to see if it is the indicated keyword. */
- return token->keyword == keyword;
+ return c_parser_peek_token (parser)->keyword == keyword;
}
/* Return true if TOKEN can start a type name,
===================================================================