Do not fail with _Alignas(0) and _Alignas(1), used by autotools

Used by configure scripts, generated by newer GNU autotools
Autotools now checks for C11 and C99 compatibbility

--
bye bye Detlef
This commit is contained in:
Detlef Riekenberg 2022-07-28 18:30:54 +02:00
parent bc12ab02c0
commit 746560dc45

View File

@ -4477,7 +4477,7 @@ static int parse_btype(CType *type, AttributeDef *ad)
type_size(&type1, &n);
} else {
n = expr_const();
if (n <= 0 || (n & (n - 1)) != 0)
if (n < 0 || ((n > 1) & ((n & (n - 1)) != 0)))
tcc_error("alignment must be a positive power of two");
}
skip(')');