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

2013-07-29 Thread David Chisnall
On 28 Jul 2013, at 22:27, Raphael Kubo da Costa rak...@freebsd.org wrote: 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. Please provide a test case.

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

2013-07-29 Thread Raphael Kubo da Costa
David Chisnall thera...@freebsd.org writes: On 28 Jul 2013, at 22:27, Raphael Kubo da Costa rak...@freebsd.org wrote: 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()

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

2013-07-29 Thread Pasi Parviainen
On 29.7.2013 14:27, Raphael Kubo da Costa wrote: David Chisnall thera...@freebsd.org writes: On 28 Jul 2013, at 22:27, Raphael Kubo da Costa rak...@freebsd.org wrote: This seems to have been committed in r253321, and broke some code that was working with r253320; namely, some code in

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

2013-07-29 Thread Raphael Kubo da Costa
Raphael Kubo da Costa rak...@freebsd.org writes: 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. For posterity, David has reverted the code back to

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

2013-07-28 Thread Raphael Kubo da Costa
Pasi Parviainen pasi.parviai...@iki.fi writes: On 13.7.2013 13:12, David Chisnall wrote: On 12 Jul 2013, at 22:47, O. Hartmann ohart...@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

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

2013-07-13 Thread David Chisnall
On 12 Jul 2013, at 22:47, O. Hartmann ohart...@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

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

2013-07-13 Thread Pasi Parviainen
On 13.7.2013 13:12, David Chisnall wrote: On 12 Jul 2013, at 22:47, O. Hartmann ohart...@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

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

2013-07-12 Thread Scot Hetzel
On Thu, Jul 11, 2013 at 9:33 AM, David Chisnall thera...@freebsd.org wrote: 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

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

2013-07-12 Thread Scot Hetzel
On Fri, Jul 12, 2013 at 11:16 AM, Scot Hetzel swhet...@gmail.com wrote: On Thu, Jul 11, 2013 at 9:33 AM, David Chisnall thera...@freebsd.org wrote: 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

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

2013-07-12 Thread O. Hartmann
On Fri, 12 Jul 2013 12:13:58 -0500 Scot Hetzel swhet...@gmail.com wrote: On Fri, Jul 12, 2013 at 11:16 AM, Scot Hetzel swhet...@gmail.com wrote: On Thu, Jul 11, 2013 at 9:33 AM, David Chisnall thera...@freebsd.org wrote: On 11 Jul 2013, at 13:11, Bruce Evans b...@optusnet.com.au wrote:

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

2013-07-11 Thread David Chisnall
Hi Bruce, You're joining in this discussion starting in the middle, so you probably missed the earlier explanation. On 11 Jul 2013, at 05:21, Bruce Evans b...@optusnet.com.au wrote: I don't see how any conforming program can access the isnan() function directly. It is just as protected as

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

2013-07-11 Thread Tijl Coosemans
On 2013-07-11 06:21, Bruce Evans wrote: On Wed, 10 Jul 2013, Garrett Wollman wrote: On Wed, 10 Jul 2013 22:12:59 +0200, Tijl Coosemans t...@freebsd.org said: I think isnan(double) and isinf(double) in math.h should only be visible if (_BSD_VISIBLE || _XSI_VISIBLE) __ISO_C_VISIBLE 1999. For

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

2013-07-11 Thread Bruce Evans
On Thu, 11 Jul 2013, David Chisnall wrote: You're joining in this discussion starting in the middle, so you probably missed the earlier explanation. I was mainly addressing a C99 point. I know little about C++ or C11. On 11 Jul 2013, at 05:21, Bruce Evans b...@optusnet.com.au wrote: I

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

2013-07-11 Thread David Chisnall
On 11 Jul 2013, at 13:11, Bruce Evans b...@optusnet.com.au wrote: math.h is also not required to be conforming C code, let alone C++ code, so there is only a practical requirement that it works when included in the C++ implementation. Working with the C++ implementation is the problem that we

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

2013-07-11 Thread Bruce Evans
On Thu, 11 Jul 2013, Tijl Coosemans wrote: On 2013-07-11 06:21, Bruce Evans wrote: On Wed, 10 Jul 2013, Garrett Wollman wrote: On Wed, 10 Jul 2013 22:12:59 +0200, Tijl Coosemans t...@freebsd.org said: I think isnan(double) and isinf(double) in math.h should only be visible if (_BSD_VISIBLE

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

2013-07-11 Thread David Chisnall
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

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

2013-07-11 Thread Bruce Evans
On Thu, 11 Jul 2013, David Chisnall wrote: On 11 Jul 2013, at 13:11, Bruce Evans b...@optusnet.com.au wrote: math.h is also not required to be conforming C code, let alone C++ code, so there is only a practical requirement that it works when included in the C++ implementation. Working with

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

2013-07-11 Thread Bruce Evans
On Thu, 11 Jul 2013, David Chisnall wrote: 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

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

2013-07-10 Thread O. Hartmann
Whe I try to compile the sources of a port in spe (devel/pocl), which is now out as RC6, I receive this error shown below: [...] ../vecmathlib/pocl/../vec_sse_double1.h:451:38: error: conversion from 'int' to 'boolvec_t' (aka 'boolvecreal_t, size') is ambiguous boolvec_t isinf() const { return

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

2013-07-10 Thread David Chisnall
Hi, On 10 Jul 2013, at 14:58, O. Hartmann ohart...@zedat.fu-berlin.de wrote: Whe I try to compile the sources of a port in spe (devel/pocl), which is now out as RC6, I receive this error shown below: [...] ../vecmathlib/pocl/../vec_sse_double1.h:451:38: error: conversion from 'int' to

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

2013-07-10 Thread O. Hartmann
On Wed, 10 Jul 2013 15:22:58 +0100 David Chisnall thera...@freebsd.org wrote: Hi, On 10 Jul 2013, at 14:58, O. Hartmann ohart...@zedat.fu-berlin.de wrote: Whe I try to compile the sources of a port in spe (devel/pocl), which is now out as RC6, I receive this error shown below:

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

2013-07-10 Thread David Chisnall
On 10 Jul 2013, at 17:33, O. Hartmann ohart...@zedat.fu-berlin.de wrote: Hi David, thanks for the fast response. The code I was told to check with is this: #include iostream #include typeinfo #include cmath int main(void) { std::cout typeid(isnan(1.0)).name() \n; }

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

2013-07-10 Thread O. Hartmann
On Wed, 10 Jul 2013 18:04:16 +0100 David Chisnall thera...@freebsd.org wrote: On 10 Jul 2013, at 17:33, O. Hartmann ohart...@zedat.fu-berlin.de wrote: Hi David, thanks for the fast response. The code I was told to check with is this: #include iostream #include typeinfo

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

2013-07-10 Thread Tijl Coosemans
On 2013-07-10 20:32, O. Hartmann wrote: On Wed, 10 Jul 2013 18:04:16 +0100 David Chisnall thera...@freebsd.org wrote: On 10 Jul 2013, at 17:33, O. Hartmann ohart...@zedat.fu-berlin.de wrote: Hi David, thanks for the fast response. The code I was told to check with is this: #include

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

2013-07-10 Thread Garrett Wollman
On Wed, 10 Jul 2013 22:12:59 +0200, Tijl Coosemans t...@freebsd.org said: I think isnan(double) and isinf(double) in math.h should only be visible if (_BSD_VISIBLE || _XSI_VISIBLE) __ISO_C_VISIBLE 1999. For C99 and higher there should only be the isnan/isinf macros. I believe you are

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

2013-07-10 Thread Bruce Evans
On Wed, 10 Jul 2013, Garrett Wollman wrote: On Wed, 10 Jul 2013 22:12:59 +0200, Tijl Coosemans t...@freebsd.org said: I think isnan(double) and isinf(double) in math.h should only be visible if (_BSD_VISIBLE || _XSI_VISIBLE) __ISO_C_VISIBLE 1999. For C99 and higher there should only be the