Ask Your Question
1

Does gcc support _Decimal64 (libdecnumber) in Fedora [solved]

asked 2017-09-05 03:48:22 -0600

Guus gravatar image

updated 2017-09-06 13:58:07 -0600

When compiling a program that defines _Decimal64 or _Decimal128 gcc issues an error "unkown typename _Decimal64".

Is gcc under Fedora compiled with --enable-decimal-float as "yes" or "bid" or "dpd"?

I run Fedora 26:

Linux <hostname> 4.12.9-300.fc26.x86_64 #1 SMP Fri Aug 25 13:09:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

gcc --version:

gcc (GCC) 7.1.1 20170622 (Red Hat 7.1.1-3)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
edit retag flag offensive close merge delete

Comments

I had to change to header to include solved because I don't have the karma to accept my own answer.

Guus gravatar imageGuus ( 2017-09-06 13:58:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-06 13:56:01 -0600

Guus gravatar image

After I posted this question, being impatient, I posed the same question to the gcc-help mailing list. I promply got an answer that it was working for someone else using Fedora 26. So I went back and checked with a micro program, that had only one variable and a printf, and it compiled and worked (more or less).

What was going on?

When I went back to my project the only difference in compiling was "-std=c11". Removed that and the program compiled fine. From the gcc-help list I got the advice to use "-std=gnu11" instead, because "-std=c11' excludes extensions.

So there you go: use -std=gnu11 in order to use the Decimal Floating Point extension.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-05 03:48:22 -0600

Seen: 166 times

Last updated: Sep 06 '17