This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: <bits/features.h> setting of __STDC_IEC_559__ not universallyaccurate


Ulrich Drepper wrote:
Mark Mitchell wrote:

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__.


The interface glibc provides requires this.  If the broken arm runtime
cannot handle it, fix it.

I don't fully understand.


C99 certainly allows implementations not to define this macro, and (AFAICT) GLIBC is still C99-conformant for ARM, with respect to these sorts of issues, modulo the setting of __STDC_IEC_559__.

I do agree that it would be best to fix the runtime to support the full IEC 559 functionality, but I'm concerned about the fact that, until that happens, GLIBC is defining this macro incorrectly. It seems like we're making it unnecessarily hard for people to write portable programs that conditionalize their use of IEC 559 functionality on whether or not this macro is defined.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]