From 68918e744db7fd361c8c11ee56618b2aa944e3e9 Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 31 Oct 2018 10:55:17 +0000 Subject: [PATCH] Ignore "#ident" as found in some old sources. Signed-off-by: Dan Carpenter --- pre-process.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pre-process.c b/pre-process.c index fa4e047e..a33ef692 100644 --- a/pre-process.c +++ b/pre-process.c @@ -1969,6 +1969,14 @@ static int handle_line(struct stream *stream, struct token **line, struct token return 1; } +/* + * Ignore "#ident". + */ +static int handle_ident(struct stream *stream, struct token **line, struct token *token) +{ + return 1; +} + static int handle_nondirective(struct stream *stream, struct token **line, struct token *token) { sparse_error(token->pos, "unrecognized preprocessor line '%s'", show_token_sequence(token, 0)); @@ -1995,6 +2003,7 @@ static void init_preprocessor(void) { "include_next", handle_include_next }, { "pragma", handle_pragma }, { "line", handle_line }, + { "ident", handle_ident }, // our internal preprocessor tokens { "nostdinc", handle_nostdinc }, -- 2.11.4.GIT