Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jul 2013 00:27:02 +0300
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        Pasi Parviainen <pasi.parviainen@iki.fi>
Cc:        Scot Hetzel <swhetzel@gmail.com>, "O. Hartmann" <ohartman@zedat.fu-berlin.de>, David Chisnall <theraven@freebsd.org>, "freebsd-toolchain@FreeBSD.org" <freebsd-toolchain@freebsd.org>, Garrett Wollman <wollman@csail.mit.edu>, FreeBSD Current <freebsd-current@freebsd.org>, Tijl Coosemans <tijl@freebsd.org>, "freebsd-standards@FreeBSD.org" <freebsd-standards@freebsd.org>
Subject:   Re: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity
Message-ID:  <861u6iv0ih.fsf@orwell.Elisa>
In-Reply-To: <51E145CC.8080900@iki.fi> (Pasi Parviainen's message of "Sat, 13 Jul 2013 15:19:24 %2B0300")
References:  <20130710155809.0f589c22@thor.walstatt.dyndns.org> <CD51F125-AE9E-4461-916D-CF583002B47D@FreeBSD.org> <20130710183315.725dfde0@thor.walstatt.dyndns.org> <C8C94CF2-7D5A-471B-AD63-8E961AED6274@FreeBSD.org> <20130710203200.5359fd18@thor.walstatt.dyndns.org> <51DDC04B.6040209@FreeBSD.org> <20957.49978.73666.392417@khavrinen.csail.mit.edu> <20130711130043.R920@besplex.bde.org> <FD768A6B-8B72-44A1-BC1C-14FF44CB4643@FreeBSD.org> <20130711202908.L84170@besplex.bde.org> <C00DFA94-6182-4334-9C90-8012E576E475@FreeBSD.org> <CACdU%2Bf9RmwxSiMEjOwSXHtnDwKk4xY8fmA3aBE5mzrVUkrc1Nw@mail.gmail.com> <CACdU%2Bf-LKsHsPayUYAT-cip91O=CfQg2aJ1BKC5PRd6G9Kf28w@mail.gmail.com> <20130712234749.5afa3c9b@thor.walstatt.dyndns.org> <9B0A6D14-640E-4ADD-8E58-0B7867C7C674@FreeBSD.org> <51E145CC.8080900@iki.fi>

next in thread | previous in thread | raw e-mail | index | archive | help
Pasi Parviainen <pasi.parviainen@iki.fi> writes:

> On 13.7.2013 13:12, David Chisnall wrote:
>> On 12 Jul 2013, at 22:47, "O. Hartmann" <ohartman@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?861u6iv0ih.fsf>