This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Making double precision constants work with -fsingle-precision-constant
- From: Richard Henderson <rth at redhat dot com>
- To: "Carlos O'Donell" <carlos at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Wed, 7 Dec 2005 12:34:22 -0800
- Subject: Re: [PATCH] Making double precision constants work with -fsingle-precision-constant
- References: <20051129021133.GB14313@lios> <20051129051045.GA19722@redhat.com> <20051207192507.GA8702@lios>
On Wed, Dec 07, 2005 at 02:25:08PM -0500, Carlos O'Donell wrote:
> * gcc/c-cppbuiltin.c (builtin_define_float_constants): Add
> fp_cast parameter, pass to builtin_define_with_hex_fp_value.
> (builtin_define_with_hex_fp_value): Use fp_cast when building macro.
> (c_cpp_builtins): If flag_single_precision_constant then set fp_cast
> to "((double)%sL)" otherwise "%s".
This part looks ok, as far as it goes.
> * libstdc++-v3/include/std/std_limits.h
> [__DBL_DENORM_MIN__] (struct numeric_limits): Set denorm_present.
> [!__DBL_DENORM_MIN__] (struct numeric_limits): Set denorm_absent.
This part is wrong. __DBL_DENORM_MIN__ will be defined, but
evaluate to zero, if denormals are not supported.
Personally I think this option is very deeply flawed, for the
reasons shown by this patch. And thus it should simply be
removed instead of hacked around in this way.
r~