diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-27 20:39:34 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-27 22:58:52 +0100 |
| commit | 41b3c7a50727f715111d09af982e2e9a0deeb688 (patch) | |
| tree | 0192d5295fd3cfca625ba769be2188ef72b15d64 /CMakeLists.txt | |
| parent | 6ee366e765483f6b48537d97fc81ae56f13d1b7f (diff) | |
| download | tinycc-41b3c7a50727f715111d09af982e2e9a0deeb688.tar.gz tinycc-41b3c7a50727f715111d09af982e2e9a0deeb688.tar.bz2 | |
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.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 41dd81b..fb0d968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,8 @@ endif() # Use two variables to keep CMake configuration variable names consistent set(TCC_BCHECK OFF CACHE BOOL "Enable bounds checking") set(CONFIG_TCC_BCHECK ${TCC_BCHECK}) +set(TCC_ASSERT OFF CACHE BOOL "Enable assertions") +set(CONFIG_TCC_ASSERT ${TCC_ASSERT}) set(TCC_BUILD_NATIVE ON CACHE BOOL "Build native compiler") set(TCC_BUILD_I386 OFF CACHE BOOL "Build i386 cross compiler") |
