On 11 Jul 2013, at 13:11, Bruce Evans <b...@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.

This does not use __builtin_isnan(), but it does:

- Stop exposing isnan and isinf in the header.  We already have __isinf in 
libc, so this is used instead.

- Call the static functions for isnan __inline__isnan*() so that they don't 
conflict with the ones in libm.

- Add an __fp_type_select() macro that uses either __Generic(), 
__builtin_choose_expr() / __builtin_choose_expr(), or sizeof() comparisons, 
depending on what the compiler supports.

- Refactor all of the type-generic macros to use __fp_type_select().  

David


Attachment: isnan.diff
Description: Binary data

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to