[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#948490: gcc-9: -std=c11 prevents the use of decimal FP



On 09.01.20 14:24, Vincent Lefevre wrote:
> Package: gcc-9
> Version: 9.2.1-22
> Severity: normal
> 
> The -std=c11 option (or other versions of the C standard) prevents
> the use of decimal FP:
> 
> $ cat tst.c
> int main (void)
> {
>   _Decimal64 x = 1;
>   return x != 1;
> }
> $ gcc-9 tst.c -o tst
> $ gcc-9 -std=c11 tst.c -o tst
> tst.c: In function ‘main’:
> tst.c:3:3: error: unknown type name ‘_Decimal64’
>     3 |   _Decimal64 x = 1;
>       |   ^~~~~~~~~~
> 
> There is no such issue with gcc-snapshot (_Decimal64 is not a
> forbidden extension):
> 
> $ gcc-snapshot -std=c11 tst.c -o tst
> $ gcc-snapshot -std=c11 -pedantic tst.c -o tst
> tst.c: In function 'main':
> tst.c:3:3: warning: ISO C does not support decimal floating-point before C2X [-Wpedantic]
>     3 |   _Decimal64 x = 1;
>       |   ^~~~~~~~~~
> 
> The GCC 9.2.0 manual does not mention a possible limitation.

please could you recheck with trunk, and report that upstream?


Reply to: