aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorChristopher Li <sparse@chrisli.org>2004-04-15 18:03:32 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:01:32 -0700
commit3fa9388c747eafb1ba72c563acec5cf941b33f87 (patch)
tree6c329864e295cdef54794b233cfa892e5e5e6cab
parentde3268a2df137bc139ba6eca29a87692e7547805 (diff)
downloadsparse-dev-3fa9388c747eafb1ba72c563acec5cf941b33f87.tar.gz
[PATCH] make sparse recognise assembler naming (register and symbol names)
-rw-r--r--parse.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index cda9a4fa..ffdd1a1c 100644
--- a/parse.c
+++ b/parse.c
@@ -1170,6 +1170,15 @@ static struct token *external_declaration(struct token *token, struct symbol_lis
}
for (;;) {
+ if (token_type(token) == TOKEN_IDENT) {
+ if (token->ident == &asm_ident || token->ident == &__asm_ident || token->ident == &__asm___ident) {
+ struct expression *expr;
+
+ token = expect(token->next, '(', "after asm");
+ token = parse_expression(token->next, &expr);
+ token = expect(token, ')', "after asm");
+ }
+ }
if (!is_typedef && match_op(token, '=')) {
if (decl->ctype.modifiers & MOD_EXTERN) {
warn(decl->pos, "symbol with external linkage has initializer");