CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity
Scot Hetzel
swhetzel at gmail.com
Fri Jul 12 16:16:47 UTC 2013
On Thu, Jul 11, 2013 at 9:33 AM, David Chisnall <theraven at freebsd.org> wrote:
> On 11 Jul 2013, at 13:11, Bruce Evans <brde at optusnet.com.au> wrote:
>
>> The error message for the __builtin_isnan() version is slightly better up
>> to where it says more.
>>
>> The less-unportable macro can do more classification and detect problems
>> at compile time using __typeof().
>
> The attached patch fixes the related test cases in the libc++ test suite. Please review.
>
#define fpclassify(x) \
- ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
- : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
- : __fpclassifyl(x))
+ __fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyd)
The last __fpclassifyd should be __fpclassifyl.
--
DISCLAIMER:
No electrons were maimed while sending this message. Only slightly bruised.
More information about the freebsd-toolchain
mailing list