_Static_assert must be followed by semicolon

as per the C11 grammar.
This commit is contained in:
Michael Matz 2019-05-03 00:22:35 +02:00
parent e371642e6b
commit d30bc6d00a
2 changed files with 3 additions and 2 deletions

View File

@ -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)); tcc_error("%s", get_tok_str(tok, &tokc));
next(); next();
skip(')'); skip(')');
skip(';');
continue; continue;
} }
if (!parse_btype(&btype, &adbase)) { if (!parse_btype(&btype, &adbase)) {

View File

@ -179,7 +179,7 @@ void * _Alignas(16) p1;
#elif defined test_static_assert #elif defined test_static_assert
#define ONE 0 #define ONE 0
_Static_assert(ONE == 0, "don't show me this") _Static_assert(ONE == 0, "don't show me this");
_Static_assert(ONE == 1, "ONE is not 1") _Static_assert(ONE == 1, "ONE is not 1");
#endif #endif