diff options
author | Richard Henderson <rth@redhat.com> | 2002-09-16 09:58:42 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-09-16 09:58:42 -0700 |
commit | ac520ec919a6794a954d007ba1987a5cd73b8239 (patch) | |
tree | 2ef5954b69cdeed2027a4e23fc91a6f7da31c80e /gcc/c-common.c | |
parent | 233dad07b2bd9a161e21bd16459f397aff90d7b5 (diff) | |
download | gcc-ac520ec919a6794a954d007ba1987a5cd73b8239.zip gcc-ac520ec919a6794a954d007ba1987a5cd73b8239.tar.gz gcc-ac520ec919a6794a954d007ba1987a5cd73b8239.tar.bz2 |
c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__.
gcc/
* c-common.c (builtin_define_float_constants): Emit __FOO_DENORM_MIN__.
libstdc++/
* include/std/std_limits.h (__glibcpp_f32_denorm_min_bytes,
__glibcpp_f32_has_denorm, __glibcpp_f64_denorm_min_bytes,
__glibcpp_f64_has_denorm, __glibcpp_f80_denorm_min_bytes,
__glibcpp_f80_has_denorm, __glibcpp_f96_denorm_min_bytes,
__glibcpp_f96_has_denorm, __glibcpp_f128_denorm_min_bytes,
__glibcpp_f128_has_denorm, __glibcpp_float_denorm_min_bytes,
__glibcpp_float_has_denorm, __glibcpp_double_denorm_min_bytes,
__glibcpp_double_has_denorm, __glibcpp_long_double_denorm_min_bytes,
__glibcpp_long_double_has_denorm): Remove.
(__glibcpp_float_denorm_min, __glibcpp_double_denorm_min,
__glibcpp_long_double_denorm_min): Remove.
(std::numeric_limits<float>::has_denorm): Use __FLT_DENORM_MIN__.
(std::numeric_limits<float>::denorm_min): Likewise.
(std::numeric_limits<double>): Similarly.
(std::numeric_limits<long double>): Similarly.
* src/limits.cc (__glibcpp_float_denorm_min,
__glibcpp_double_denorm_min, __glibcpp_long_double_denorm_min): Remove.
From-SVN: r57200
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 34941e0..bdb8a58 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5048,6 +5048,13 @@ builtin_define_float_constants (name_prefix, fp_suffix, type) sprintf (name, "__%s_EPSILON__", name_prefix); sprintf (buf, "0x1p%d", (1 - mant_dig) * log2_b); builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); + + /* For C++ std::numeric_limits<T>::denorm_min. The minimum denormalized + positive floating-point number, b**(min_exp-p). Winds up being zero + for targets that don't support denormals. */ + sprintf (name, "__%s_DENORM_MIN__", name_prefix); + sprintf (buf, "0x1p%d", (min_exp - mant_dig) * log2_b); + builtin_define_with_hex_fp_value (name, type, decimal_dig, buf, fp_suffix); } /* Hook that registers front end and target-specific built-ins. */ |