From 41b3c7a50727f715111d09af982e2e9a0deeb688 Mon Sep 17 00:00:00 2001 From: James Lyon Date: Sat, 27 Apr 2013 20:39:34 +0100 Subject: Improved variable length array support. VLA storage is now freed when it goes out of scope. This makes it possible to use a VLA inside a loop without consuming an unlimited amount of memory. Combining VLAs with alloca() should work as in GCC - when a VLA is freed, memory allocated by alloca() after the VLA was created is also freed. There are some exceptions to this rule when using goto: if a VLA is in scope at the goto, jumping to a label will reset the stack pointer to where it was immediately after the last VLA was created prior to the label, or to what it was before the first VLA was created if the label is outside the scope of any VLA. This means that in some cases combining alloca() and VLAs will free alloca() memory where GCC would not. --- config.h.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config.h.in') diff --git a/config.h.in b/config.h.in index 16393e9..c9e1a18 100644 --- a/config.h.in +++ b/config.h.in @@ -3,4 +3,5 @@ #cmakedefine CONFIG_WIN32 #cmakedefine CONFIG_WIN64 -#cmakedefine CONFIG_TCC_BCHECK \ No newline at end of file +#cmakedefine CONFIG_TCC_BCHECK +#cmakedefine CONFIG_TCC_ASSERT -- cgit v1.3.1