This is the mail archive of the gcc-bugs@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]

[Bug middle-end/32668] New: The type-generic builtins apply default promotions


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


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