This is the mail archive of the
mailing list for the glibc project.
<bits/features.h> setting of __STDC_IEC_559__ not universally accurate
- From: Mark Mitchell <mark at codesourcery dot com>
- To: libc-alpha at sources dot redhat dot com
- Cc: joseph at codesourcery dot com
- Date: Mon, 28 Mar 2005 16:05:38 -0800
- Subject: <bits/features.h> setting of __STDC_IEC_559__ not universally accurate
- Organization: CodeSourcery, LLC
At present, <bits/features.h> unconditionally sets __STDC_IEC_559__ to
1. This is not accurate on (at least) ARM platforms using software
floating-point. On those platforms, <fenv.h> does not define
FE_INEXACT, and friends, because the software floating-point emulation
provided by libgcc does not honor those rounding modes. According to
the C99 standard, that would seem to preclude setting __STDC_IEC_559__.
But, AFAICT, there is no sysdeps machinery for overriding this setting.
Ideally, the software floating-point emulation would indeed provide full
IEC 559 conformance. And, as the CONFORMANCE file indicates,
__STDC_IEC_559__ should really be defined by the compiler, so that it is
set throughout the entire translation unit.
Unfortunately, the compiler cannot actually define __STDC_IEC_559__ to
zero, as <bits/features.h> unconditionally sets it to 1; any aattempted
assignment by the compiler would be overridden.
So, I think that we should make two changes:
1. Modify GLIBC to provide a sysdeps-specific method for setting
2. Make the setting conditional on the fact that the value is not
already defined, so that the compiler can be enhanced to set the value
I'd appreciate any guidance.