aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2004-07-15 21:13:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:02:12 -0700
commita1ec3c79c0f648d2f96531e068325233c54f101f (patch)
treeabca06ec3ce149d73695f851159c849db9b08f3f /compile-i386.c
parentThe base type of an enum is "int". (diff)
downloadsparse-a1ec3c79c0f648d2f96531e068325233c54f101f.tar.gz
sparse-a1ec3c79c0f648d2f96531e068325233c54f101f.tar.bz2
sparse-a1ec3c79c0f648d2f96531e068325233c54f101f.zip
[PATCH] teach sparse about __alignof__
This teaches sparse what __alignof__ really means, instead of just using the same code as "__sizeof__" It gets rid of the warnings in ebtables that does: struct ebt_entries { ... char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))); }; Which caused warning because sparse was evaluating __alignof__ as the same as sizeof, and sizeof was 57 (ie non-power of 2). This is just based on the existing code and a peek at the data structures in expression and symbol.
Diffstat (limited to 'compile-i386.c')
-rw-r--r--compile-i386.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/compile-i386.c b/compile-i386.c
index 70253b7..2c9bef7 100644
--- a/compile-i386.c
+++ b/compile-i386.c
@@ -2121,6 +2121,7 @@ static struct storage *x86_expression(struct expression *expr)
return emit_symbol_expr_init(expr->symbol);
case EXPR_DEREF:
case EXPR_SIZEOF:
+ case EXPR_ALIGNOF:
warn(expr->pos, "invalid expression after evaluation");
return NULL;
case EXPR_CAST: