diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2013-09-19 18:58:46 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2013-09-19 18:58:46 +0200 |
| commit | a465b7f58fdea15caa1bfb81ff5e985c94c4df4a (patch) | |
| tree | 8cbd68abe8e279e3a8d9f294bfc865e6ffac56b7 /tccgen.c | |
| parent | 642b6d0f50c6b6a842c9239a102fe34d5619e931 (diff) | |
| download | tinycc-a465b7f58fdea15caa1bfb81ff5e985c94c4df4a.tar.gz tinycc-a465b7f58fdea15caa1bfb81ff5e985c94c4df4a.tar.bz2 | |
Forbid the use of array of functions
Prevent the following code from compiling:
int (*fct)[42](int x);
Reported-by: Abdul Wadud Mohammad Mohibur Rashid <mohibur_rashid@yahoo.com>
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3278,6 +3278,8 @@ static void post_type(CType *type, AttributeDef *ad) skip(']'); /* parse next post type */ post_type(type, ad); + if (type->t == VT_FUNC) + tcc_error("declaration of an array of functions"); t1 |= type->t & VT_VLA; if (t1 & VT_VLA) { |
