C, add fract and accum

This commit is contained in:
Jakob Lykke Andersen 2021-08-14 16:03:54 +02:00
parent c5962b70bd
commit e2ae287f1c
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ _simple_type_sepcifiers_re = re.compile(r"""(?x)
|__float80|_Float64x|__float128|_Float128|__ibm128
|__fp16
# Fixed-point, extension
|(_Sat\s+)?((signed|unsigned)\s+)?((short|long|long\s+long)\s+)?(_Fract|_Accum)
|(_Sat\s+)?((signed|unsigned)\s+)?((short|long|long\s+long)\s+)?(_Fract|fract|_Accum|accum)
# Integer types that could be prefixes of the previous ones
# ---------------------------------------------------------
|((signed|unsigned)\s+)?(short|long\s+long|long)

View File

@ -318,7 +318,7 @@ def test_domain_c_ast_fundamental_types():
# -----------------------------
# https://gcc.gnu.org/onlinedocs/gcc/Fixed-Point.html#Fixed-Point
for sat in ('', '_Sat '):
for t in ('_Fract', '_Accum'):
for t in ('_Fract', 'fract', '_Accum', 'accum'):
for size in ('short ', '', 'long ', 'long long '):
for tt in signed(size + t):
yield sat + tt