This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32668] New: The type-generic builtins apply default promotions
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jul 2007 19:22:20 -0000
- Subject: [Bug middle-end/32668] New: The type-generic builtins apply default promotions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The type-generic builtins apply the default variadic promotions to their
arguments before handing them off to the middle-end for processing. This is
bad because e.g. __builtin_isnan(f), where f is a float, gets turned into
__builtin_isnan((double)f).
In most cases, the cast to double merely becomes a pessimization. However if
we use a variadic builtin to implement e.g. isnormal, then casting a float
argument to double can take a subnormal float like FLT_MIN/2 and make it a
"normal" value because of the extended range of double.
See:
http://gcc.gnu.org/ml/gcc/2007-07/msg00221.html
--
Summary: The type-generic builtins apply default promotions
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ghazi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32668