diff options
| author | Joe Soroka <gits@joesoroka.com> | 2011-07-11 00:18:36 -0700 |
|---|---|---|
| committer | Joe Soroka <gits@joesoroka.com> | 2011-07-11 00:18:36 -0700 |
| commit | c71798c37690d73c91e7b345b0dd8e2a7738006e (patch) | |
| tree | be8d2c8c42d6f2e7feb6ab725f2957a74b1571e6 /tccgen.c | |
| parent | cd3d1a45f34be3c9a358f1743bcaf8aac897992e (diff) | |
| download | tinycc-c71798c37690d73c91e7b345b0dd8e2a7738006e.tar.gz tinycc-c71798c37690d73c91e7b345b0dd8e2a7738006e.tar.bz2 | |
handle arrays with a flexible member but no initializer
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5146,7 +5146,7 @@ static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r, literals). It also simplifies local initializers handling */ tok_str_new(&init_str); - if (size < 0 || flexible_array) { + if (size < 0 || (flexible_array && has_init)) { if (!has_init) error("unknown type size"); /* get all init string */ |
