From owner-freebsd-toolchain@FreeBSD.ORG Wed Jul 10 13:58:11 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 62DC6A89; Wed, 10 Jul 2013 13:58:11 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 24D161F54; Wed, 10 Jul 2013 13:58:10 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) with esmtp (envelope-from ) id <1UwuuI-003yZu-34>; Wed, 10 Jul 2013 15:58:10 +0200 Received: from e179143131.adsl.alicedsl.de ([85.179.143.131] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) with esmtpsa (envelope-from ) id <1UwuuH-003t8L-Vw>; Wed, 10 Jul 2013 15:58:10 +0200 Date: Wed, 10 Jul 2013 15:58:09 +0200 From: "O. Hartmann" To: FreeBSD CURRENT , 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> Organization: FU Berlin X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/ywAEzP3/20OqfEtueqUVkry"; protocol="application/pgp-signature" X-Originating-IP: 85.179.143.131 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 13:58:11 -0000 --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') 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--