From c94f80502e0bfd0aa36ca616f299ce85212cb884 Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Wed, 6 Apr 2011 15:27:45 -0700 Subject: VLA bcheck works via bound alloca; add test, remove warning --- tccgen.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tccgen.c') 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 -- cgit v1.3.1