- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
75585 has to do with
#define __STDC_WANT_DEC_FP__
This has to do with __STDC_DEC_FP__ being defined by the
compiler, yet _Decimal32 not being usable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have escalated it as a bug (here c99 corrupts Decimal FP usage).
I will keep you updated on the progress..
I will keep you updated on the progress..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler is defining __STDC_DEC_FP__
My program is testing that symbol.
So, I do not understand your comment.
My program is testing that symbol.
So, I do not understand your comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since Decimal Floating-Point (DFP) is an extension built on top of C99, how do I get both C99 and DFP?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page