aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorJoe Soroka <gits@joesoroka.com>2011-04-06 15:27:45 -0700
committerJoe Soroka <gits@joesoroka.com>2011-04-06 15:27:45 -0700
commitc94f80502e0bfd0aa36ca616f299ce85212cb884 (patch)
treefa13d8f27cdf7866d2bb503d89d98b97bc32a9fa /tccgen.c
parent810aca9e68486eabe67ab8554817522ea9fe05ac (diff)
downloadtinycc-c94f80502e0bfd0aa36ca616f299ce85212cb884.tar.gz
tinycc-c94f80502e0bfd0aa36ca616f299ce85212cb884.tar.bz2
VLA bcheck works via bound alloca; add test, remove warning
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tccgen.c b/tccgen.c
index 48efdc3..fd7ff25 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -5213,9 +5213,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r,
sec = NULL;
#ifdef CONFIG_TCC_BCHECK
if (tcc_state->do_bounds_check && (type->t & VT_ARRAY)) {
- if (type->t & VT_VLA)
- warning("Array bound check don't work for VLA");
- else
+ if (!(type->t & VT_VLA))
loc--;
}
#endif