diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-31 13:13:52 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-31 13:13:52 -0800 |
| commit | 3199700ab667063556470bdd45bfce0905465974 (patch) | |
| tree | bf845cddf803ca13a3bb7ee2da02098369de7e3d /parse.h | |
| parent | 9ec2ac4c8860418beeb107bd58dc6f1284c492d0 (diff) | |
| download | sparse-dev-3199700ab667063556470bdd45bfce0905465974.tar.gz | |
Make local declarations be statements of their own
This removes the list of symbols for block statements, and instead makes
a declaration be a statement of its own.
This is necessary to correctly handle the case of mixed statements and
declarations correctly, since the order of declarations and statements
is meaningful.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'parse.h')
| -rw-r--r-- | parse.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -13,6 +13,7 @@ enum statement_type { STMT_NONE, + STMT_DECLARATION, STMT_EXPRESSION, STMT_COMPOUND, STMT_IF, @@ -31,6 +32,9 @@ struct statement { enum statement_type type; struct position pos; union { + struct /* declaration */ { + struct symbol_list *declaration; + }; struct /* label_arg */ { struct symbol *label; struct statement *label_statement; @@ -46,7 +50,6 @@ struct statement { struct statement *if_false; }; struct /* compound_struct */ { - struct symbol_list *syms; struct statement_list *stmts; struct symbol *ret; }; |
