aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-07-10 08:39:21 +0000
committerChristopher <sparse@chrisli.org>2010-07-13 00:34:09 -0700
commitc7689a5d9e7dc535ee7994f04162f93593970922 (patch)
tree64ce25fd0a8793cf0a3b46485697fa0dac73562e
parent7ccc8abebad14639c22549cf55193e50b728802f (diff)
downloadsparse-c7689a5d9e7dc535ee7994f04162f93593970922.tar.gz
parser: fix and simplify support of asm goto
1) We now handle only "asm (volatile|goto)?", whereas "asm volatile? goto?" is correct. 2) We need to match only goto_ident, so do it explicitly against token->ident without match_idents. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Christopher <sparse@chrisli.org>
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index caf10b96..9074b1de 100644
--- a/parse.c
+++ b/parse.c
@@ -1915,7 +1915,8 @@ static struct token *parse_asm_statement(struct token *token, struct statement *
stmt->type = STMT_ASM;
if (match_idents(token, &__volatile___ident, &__volatile_ident, &volatile_ident, NULL)) {
token = token->next;
- } else if (match_idents(token, &goto_ident, NULL)) {
+ }
+ if (token_type(token) == TOKEN_IDENT && token->ident == &goto_ident) {
is_goto = 1;
token = token->next;
}