This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] Making double precision constants work with -fsingle-precision-constant


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~


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