--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-9: -std=c11 prevents the use of decimal FP
- From: Vincent Lefevre <vincent@vinc17.net>
- Date: Thu, 9 Jan 2020 14:24:22 +0100
- Message-id: <20200109132422.GA739343@cventin.lip.ens-lyon.fr>
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.
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.4.0-2-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gcc-9 depends on:
ii binutils 2.33.50.20200107-1
ii cpp-9 9.2.1-22
ii gcc-9-base 9.2.1-22
ii libc6 2.29-8
ii libcc1-0 9.2.1-22
ii libgcc-9-dev 9.2.1-22
ii libgcc1 1:9.2.1-22
ii libgmp10 2:6.1.2+dfsg-4
ii libisl22 0.22-2
ii libmpc3 1.1.0-1
ii libmpfr6 4.0.2-1
ii libstdc++6 9.2.1-22
ii zlib1g 1:1.2.11.dfsg-1+b1
Versions of packages gcc-9 recommends:
ii libc6-dev 2.29-8
Versions of packages gcc-9 suggests:
ii gcc-9-doc 9.2.0-2
ii gcc-9-locales 9.2.1-22
ii gcc-9-multilib 9.2.1-22
-- no debconf information
--- End Message ---
--- Begin Message ---
- To: 948490-done@bugs.debian.org
- Subject: Re: Bug#948490: gcc-9: -std=c11 prevents the use of decimal FP
- From: Vincent Lefevre <vincent@vinc17.net>
- Date: Thu, 25 Apr 2024 20:41:11 +0200
- Message-id: <20240425184111.GA16517@qaa.vinc17.org>
- In-reply-to: <20200124025015.GJ14370@zira.vinc17.org>
- References: <20200109132422.GA739343@cventin.lip.ens-lyon.fr> <03011632-b24e-4743-6a67-d31782843a87@debian.org> <20200124025015.GJ14370@zira.vinc17.org>
On 2020-01-24 03:50:15 +0100, Vincent Lefevre wrote:
> On 2020-01-23 14:04:59 +0100, Matthias Klose wrote:
> > please could you recheck with trunk,
>
> This is still OK with the trunk (e9ee848dcdc).
>
> > and report that upstream?
>
> Done.
Now fixed upstream, but only in GCC 10+. gcc-9 is obsolete anyway.
Closing.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
--- End Message ---