This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RFC: FLT_ROUNDS and fesetround
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 15 Nov 2013 11:28:20 -0800
- Subject: RFC: FLT_ROUNDS and fesetround
- Authentication-results: sourceware.org; auth=none
Hi,
float.h has
/* Addition rounds to 0: zero, 1: nearest, 2: +inf, 3: -inf, -1: unknown. */
/* ??? This is supposed to change with calls to fesetround in <fenv.h>. */
#undef FLT_ROUNDS
#define FLT_ROUNDS 1
Clang introduces __builtin_flt_rounds and
#define FLT_ROUNDS (__builtin_flt_rounds())
I am not sure if it is the correct approach. Is there any plan to
address this in GCC and glibc?
Thanks.
--
H.J.