diff options
author | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-02 00:36:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:01:17 -0700 |
commit | 5676df39fce756158eb64f8f2015d51e73516582 (patch) | |
tree | db217c7a1725133b31fdfc12a54e9e9bb3087e2e /expression.h | |
parent | Fix symbol derefence type information merge. (diff) | |
download | sparse-5676df39fce756158eb64f8f2015d51e73516582.tar.gz sparse-5676df39fce756158eb64f8f2015d51e73516582.tar.bz2 sparse-5676df39fce756158eb64f8f2015d51e73516582.zip |
Allow variable-sized array size declarations.
This doesn't actually get them _right_, but as long as they
end up being constant when used, we at least silently ignore
them until then.
Diffstat (limited to 'expression.h')
-rw-r--r-- | expression.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/expression.h b/expression.h index 12b5ffd..935d23a 100644 --- a/expression.h +++ b/expression.h @@ -136,6 +136,16 @@ static inline struct expression *alloc_expression(struct position pos, int type) return expr; } +static inline struct expression *alloc_const_expression(struct position pos, int value) +{ + struct expression *expr = __alloc_expression(0); + expr->type = EXPR_VALUE; + expr->pos = pos; + expr->value = value; + expr->ctype = &int_ctype; + return expr; +} + /* Type name parsing */ struct token *typename(struct token *, struct symbol **); |