aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-23 15:18:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:18 -0700
commit230cb70a242f768e4493674a8815a93b0d1cbd3c (patch)
tree99c5872be5b167bdb67af6a123744977d94ff569
parent3c83edc32120201e1b35970be88ea1711cf30093 (diff)
downloadsparse-dev-230cb70a242f768e4493674a8815a93b0d1cbd3c.tar.gz
Allow EXPR_POS subexpressions in initializer evaluation.
That just happens when an initializer has already been evaluated once before, and the other positional expressions have been convered to EXPR_POS. Nothing more to do.
-rw-r--r--evaluate.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/evaluate.c b/evaluate.c
index d27ada92..4ec8782d 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1946,6 +1946,13 @@ static int evaluate_initializer(struct symbol *ctype, struct expression **ep)
return 0;
}
return evaluate_one_array_initializer(ctype->ctype.base_type, ep, 0);
+
+ case EXPR_POS:
+ /*
+ * An EXPR_POS expression has already been evaluated, and we don't
+ * need to do anything more
+ */
+ return 0;
}
}