Date: Wed, 10 Jul 2013 15:58:09 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: FreeBSD CURRENT <freebsd-current@freebsd.org>, freebsd-toolchain@freebsd.org Subject: CURRENT: CLANG 3.3 and -stad=c++11 and -stdlib=libc++: isnan()/isninf() oddity Message-ID: <20130710155809.0f589c22@thor.walstatt.dyndns.org>
next in thread | raw e-mail | index | archive | help
--Sig_/ywAEzP3/20OqfEtueqUVkry Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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 'boolvec<real_t, size>') is ambiguous boolvec_t isinf() const { return std::isinf(v); } ^~~~~~~~~~~~~ ../vecmathlib/pocl/../vec_sse_double1.h:75:5: note: candidate constructor boolvec(bvector_t x): v(x) {} ^ ../vecmathlib/pocl/../vec_sse_double1.h:76:5: note: candidate constructor boolvec(bool a): v(a) {} [...] Compilation is performed on the most recent CURRENT with CLANG 3.3 and devel/llvm (which is obviously stuck with 3.2 for now) and option switches -std=3Dc++11 -stdlib=3Dlibc++. As I was told, in standard C++11, isnan(), isinf() and fellows now should return "bool", not int as this seems obviously the case as the error documents and I was able to check with a small program. Is this a bug in FreeBSD's implementation of libc++? Or am I doing something wrong? I'm new to C++/C++11. Some advice or explanation could be helpful. regards, Oliver --Sig_/ywAEzP3/20OqfEtueqUVkry Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBAgAGBQJR3WhxAAoJEOgBcD7A/5N8LkAIAJfH+p2e3+BNB2QiNYny1NEZ tVST4i7a7D9IW9HpcPReovP+kewFvOifG0tfJ+fMm3CazCswrYx6NE/D73rb3ELv /FTYLMjxAJ9+MgLKeT2KfMlgOF+6iItcwF8q4HoDtP+frfBMcwU9eurncxul8uS+ IkJ5GkiN/n0vmSn59OJ5URfON4BrsB/PhMi5v6MGTKBURbrn/30tBvFHUmOtVB6C nfDOHRh3DkpOMtv34S4+EMo6D5CRBAmGtqat6L8aGuRpkFlEXXGaptGjwjIcOJ06 ExyswMDXiIbzx990y9r22iASNeu/wnQhCwz6WBG/DzJYQfJ+GH0tsfUEar9Yp/g= =MfJY -----END PGP SIGNATURE----- --Sig_/ywAEzP3/20OqfEtueqUVkry--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130710155809.0f589c22>