_Static_assert must be followed by semicolon
as per the C11 grammar.
This commit is contained in:
parent
e371642e6b
commit
d30bc6d00a
2 changed files with 3 additions and 2 deletions
1
tccgen.c
1
tccgen.c
|
@ -7456,6 +7456,7 @@ static int decl0(int l, int is_for_loop_init, Sym *func_sym)
|
|||
tcc_error("%s", get_tok_str(tok, &tokc));
|
||||
next();
|
||||
skip(')');
|
||||
skip(';');
|
||||
continue;
|
||||
}
|
||||
if (!parse_btype(&btype, &adbase)) {
|
||||
|
|
|
@ -179,7 +179,7 @@ void * _Alignas(16) p1;
|
|||
#elif defined test_static_assert
|
||||
|
||||
#define ONE 0
|
||||
_Static_assert(ONE == 0, "don't show me this")
|
||||
_Static_assert(ONE == 1, "ONE is not 1")
|
||||
_Static_assert(ONE == 0, "don't show me this");
|
||||
_Static_assert(ONE == 1, "ONE is not 1");
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue