aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--c/eval.c2
-rw-r--r--test/09-init.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/c/eval.c b/c/eval.c
index dc75607..e2d67d7 100644
--- a/c/eval.c
+++ b/c/eval.c
@@ -338,8 +338,6 @@ eval(struct expr *ex, enum evalmode mode)
}
if (ex->t == ECOND) {
if (!eval(&ex->sub[0], mode) || ex->sub[0].t != ENUMLIT) return 0;
- if (!eval(&ex->sub[1], mode)) return 0;
- if (!eval(&ex->sub[2], mode)) return 0;
*ex = ex->sub[!ex->sub[0].u + 1];
return eval(ex, mode);
}
diff --git a/test/09-init.c b/test/09-init.c
index dd9d2a3..6099a4d 100644
--- a/test/09-init.c
+++ b/test/09-init.c
@@ -59,6 +59,8 @@ void f() {
void *rec[1] = {rec+1};
+int static_eval = sizeof(char[ 1 ? 1 : 0/0]);
+
int printf(char *, ...);
int main() {
printf("gexplicit[4] -> %d,%d,%d,%d\n", gexplicit[0], gexplicit[1], gexplicit[2], gexplicit[3]);