From c71798c37690d73c91e7b345b0dd8e2a7738006e Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Mon, 11 Jul 2011 00:18:36 -0700 Subject: handle arrays with a flexible member but no initializer --- tccgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index cb9765c..35d5aaa 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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 */ -- cgit v1.3.1