Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity

From: Raphael Kubo da Costa <rakuco_at_FreeBSD.org>
Date: Mon, 29 Jul 2013 00:27:02 +0300
Pasi Parviainen <pasi.parviainen_at_iki.fi> writes:

> On 13.7.2013 13:12, David Chisnall wrote:
>> On 12 Jul 2013, at 22:47, "O. Hartmann" <ohartman_at_zedat.fu-berlin.de> wrote:
>>
>>> Obviously not really fixed, but even worse:
>>>
>>> if I use in C code (C99, using clang 3.3 on FreeBSD 10.0-CURRENT/amd64
>>> revision 253287) isnan(x) where x is a "const double", I receive now
>>> the following error (which doesn't appear on previous versions):
>>
>> Thanks.  This is now fixed, however the _Generic() usage that we had there is also present in tgmath.h, and so this file will also need to be fixed in the same way.
>>
>> I've now tested the macros with clang/c99, clang/c11, clang/c++98 and clang/c++11, and gcc/c89 and they all seem to work for unqualified, const, volatile, and const-volatile qualified types.
>>
>> I've added Ed to the cc: list, as he wrote this code in tgmath.h.
>>
>> David
>>
>
> Instead of listing all possible type qualifier combinations (like in
> r253319), how about using a comma operator to strip away type
> qualifiers? Since only the result type of the expression matters and
> it isn't evaluated at all.
>
> like:
>
> #define __fp_type_select(x, f, d, ld) _Generic((0,(x)),

This seems to have been committed in r253321, and broke some code that
was working with r253320; namely, some code in x11/kde4-workspace
includes math.h and calls isnan() with a const double.
Received on Sun Jul 28 2013 - 19:27:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:39 UTC