mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-21 05:40:09 +08:00
72b520e709
Fixes potential writes past the allocated space with mostly illegal flex array initializers. (60_errors_and_warnings.c :test_var_array) In exchange suspicious precautions such as section_reserve or checks with sec->data_allocated were removed. (There is an hard check 'init_assert()' for now but it's meant to be just temporary) Also, instead of filling holes, always memset(0) structures & arrays on stack. Sometimes more efficient, sometimes isn't. At least we can omit putting null initializers. About array range inititializers: Reparsing tokens has a small problem with sideeffects, for example int c = 0, dd[] = { [0 ... 1] = ++c, [2 ... 3] = ++c }; Also, instead of 'squeeze_multi_relocs()', delete pre-existing relocations in advance. This works even if secondary initializers don't even have relocations, as with [0 ... 7] = &stuff, [4] = NULL Also, in tcc.h: new macro "tcc_internal_error()" |
||
---|---|---|
.. | ||
misc | ||
pp | ||
tests2 | ||
42test.h | ||
abitest.c | ||
asm-c-connect-1.c | ||
asm-c-connect-2.c | ||
asmtest.S | ||
boundtest.c | ||
bug.c | ||
gcctestsuite.sh | ||
libtcc_test_mt.c | ||
libtcc_test.c | ||
Makefile | ||
tcctest.c | ||
tcctest.h | ||
testfp.c | ||
vla_test.c |