mirror of
https://github.com/frida/tinycc
synced 2024-11-25 09:10:53 +03:00
Add warning
For example: struct A { int b []; };
This commit is contained in:
parent
0f51ccd4e4
commit
14d0aa450f
2
tccgen.c
2
tccgen.c
@ -3030,6 +3030,8 @@ static void struct_decl(CType *type, int u, int tdef)
|
||||
skip(';');
|
||||
}
|
||||
skip('}');
|
||||
if (!c && flexible)
|
||||
tcc_error("flexible array member '%s' in otherwise empty struct", get_tok_str(v, NULL));
|
||||
/* store size and alignment */
|
||||
s->c = (c + maxalign - 1) & -maxalign;
|
||||
s->r = maxalign;
|
||||
|
Loading…
Reference in New Issue
Block a user