From 5c3a59277dedb4bc23485a92db85b8681efd32e4 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 11 Dec 2007 21:11:30 +0000 Subject: [PATCH] Ignore type declarations when handling local variables. [r18680] --- ast2firm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ast2firm.c b/ast2firm.c index 8348eca..22b2e83 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3112,6 +3112,8 @@ static void declaration_statement_to_firm(declaration_statement_t *statement) declaration_t *declaration = statement->declarations_begin; declaration_t *end = statement->declarations_end->next; for( ; declaration != end; declaration = declaration->next) { + if(declaration->namespc != NAMESPACE_NORMAL) + continue; create_local_variable(declaration); } } @@ -3645,6 +3647,8 @@ static int count_local_declarations(const declaration_t * decl, { int count = 0; for (; decl != end; decl = decl->next) { + if(decl->namespc != NAMESPACE_NORMAL) + continue; const type_t *type = skip_typeref(decl->type); if (!decl->address_taken && is_type_scalar(type)) ++count; -- 2.20.1