This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: LIA-1, denormals and is_iec559 and C++
- From: Richard Henderson <rth at redhat dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 25 Sep 2002 10:18:10 -0700
- Subject: Re: LIA-1, denormals and is_iec559 and C++
- References: <m3hege10cf.fsf@soliton.integrable-solutions.net>
On Wed, Sep 25, 2002 at 06:49:04PM +0200, Gabriel Dos Reis wrote:
> Below is the answer I got from the SC22/WG11 committee about the
> possibility of having has_denormal == denormal_absent and
> is_iec559 == true: That isn't right.
Then the following would be appropriate.
r~
* include/std/std_limits.h (numeric_limits<T>::is_iec559): False
if denormals are not supported.
Index: std_limits.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/std/std_limits.h,v
retrieving revision 1.16
diff -c -p -d -u -r1.16 std_limits.h
--- std_limits.h 23 Sep 2002 11:24:56 -0000 1.16
+++ std_limits.h 25 Sep 2002 17:16:35 -0000
@@ -912,7 +912,8 @@ namespace std
static float denorm_min() throw()
{ return __FLT_DENORM_MIN__; }
- static const bool is_iec559 = has_infinity && has_quiet_NaN;
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;
@@ -969,7 +970,8 @@ namespace std
static double denorm_min() throw()
{ return __DBL_DENORM_MIN__; }
- static const bool is_iec559 = has_infinity && has_quiet_NaN;
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;
@@ -1027,7 +1029,8 @@ namespace std
static long double denorm_min() throw()
{ return __LDBL_DENORM_MIN__; }
- static const bool is_iec559 = has_infinity && has_quiet_NaN;
+ static const bool is_iec559
+ = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
static const bool is_bounded = true;
static const bool is_modulo = false;