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: V3 PATCH: numeric_limits<> support, fix PR/3865


>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
 Richard> Anyway, I was thinking about how to define your booleans.
 Richard> Seems like the following would work:

 Richard> bool has_infinity = __builtin_huge_val() / 2 == __builtin_huge_val();

>From the name I would expect __builtin_huge_val() to return a large
finite value, not infinite...

       paul


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