Community
cancel
Showing results for 
Search instead for 
Did you mean: 
tydeman
Beginner
157 Views

Intel 64 mode: __STDC_DEC_FP__ defined, but _Decimal32 not known

Hardware: Centrino 2 vPro (Core2Duo) in 64-bit mode
O.S.: Linux Fedora Core 10 in 64-bit mode
Compiler: Intel icc 11.1, 072 in Intel64 mode
Command line options: "-std=c99 -msse3 -O0 -fmath-errno -fp-model strict -fp-speculation=strict -H ${INCS}"

The Intel compiler icc 11.1 (in C99 mode) defines __STDC_DEC_FP__,
telling the user that decimal floating-point (DFP) is supported. Yet,
if you try to use DFP, the compiler complains about unknown types.

Program:

#define __STDC_WANT_DEC_FP__ 1 /* Tell compiler we want DFP */

#ifdef __STDC_DEC_FP__ /* Does compiler support DFP? */
_Decimal32 x;
#else
#error No support for DFP
#endif
0 Kudos
8 Replies
Milind_Kulkarni__Int
New Contributor II
157 Views

Hello,

I think this issue was already raised by you in June month. The threadid in the forum is:-- 75585, and it looks same . Could you verify so that we do not duplicate the bug in the record. It also has to do with -std=c99 disabling the use of _Decimal FP types. Well, it works without the c99 option, but should work with that too, being a part of ISO C standard.

That issue is already escalated to developer team by the engineer. Please let me know.

tydeman
Beginner
157 Views

75585 has to do with IA-32 mode. This is with Intel 64 mode.

75585 has to do with not working after the user did
#define __STDC_WANT_DEC_FP__

This has to do with __STDC_DEC_FP__ being defined by the
compiler, yet _Decimal32 not being usable.
Milind_Kulkarni__Int
New Contributor II
157 Views

I have escalated it as a bug (here c99 corrupts Decimal FP usage).
I will keep you updated on the progress..
Judith_W_Intel
Employee
157 Views


A macro doesn't turn on a feature, it indicates whether or not the feature is available on a particular platform. It should be used to check availability, not set it.
tydeman
Beginner
157 Views

The compiler is defining __STDC_DEC_FP__
My program is testing that symbol.
So, I do not understand your comment.
Judith_W_Intel
Employee
157 Views


I'm sorry, I misread the first line of your program:

#define __STDC_WANT_DEC_FP__ 1 /* Tell compiler we want DFP */

I thought this said __STDC_DEC_FP not __STDC_WANT_DEC_FP__.

Anyway, I understand your point now that if the compiler's not going to accept the DFPkeywords
it shouldn't define the macro. I agree.

This is entered as cq # DPD200159716.

Sorry for the confusion.

Judy
Milind_Kulkarni__Int
New Contributor II
157 Views

This issue is fixed in latest compiler of 12.0.
For compatibility with GNU, we do not, and will not, recognize DFP types when -std=c99 is used.

Now, the __STDC_DEC_FP does not get defined, and the appropriate assertion comes.
tydeman
Beginner
157 Views

Since Decimal Floating-Point (DFP) is an extension built on top of C99, how do I get both C99 and DFP?
Reply