diff options
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3169,6 +3169,8 @@ static void post_type(CType *type, AttributeDef *ad) n = vtop->c.i; if (n < 0) error("invalid array size"); + } else if (!local_stack) { + error("expected constant expression (variably modified array at file scope)"); } else { if (!is_integer_btype(vtop->type.t & VT_BTYPE)) error("size of variable length array should be an integer"); |
