handle arrays with a flexible member but no initializer
This commit is contained in:
2
tccgen.c
2
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 */
|
||||
|
||||
Reference in New Issue
Block a user