Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jul 2013 10:11:28 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   libc++: std::isinf() returns "int", is supposed to return boolvec_t
Message-ID:  <20130707101128.03579a41@thor.walstatt.dyndns.org>

next in thread | raw e-mail | index | archive | help
--Sig_/6zPmX=ldJTx0gtKU3Woks2_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable


Hello.

I try to compile a package of C++ software for FreeBSD with CLANG which
uses clang++. I have to use -stdlib=3Dlibc++ -std=3Dc++11.

I receive the following error and after consulting developers of the
code I was informed that libc++ routine "std::isinf()" should return
boolvec_t, but it returns obviously int.

Well, I'm not an expert, I take this for true and I'm inclinded to ask
here whether there is a bug I discover in the code I'm supposed to
compile or whether this is a bug in the FreeBSD's libc++ implementation
used.

The fault is as follows:

[...]

/usr/bin/clang++ -Xclang -ffake-address-space-map -std=3Dc++11
-fno-exceptions -emit-llvm -ffp-contract=3Doff  -stdlib=3Dlibc++ -c -target
amd64-portbld-freebsd10.0 -o acosh.cc.bc ../vecmathlib/pocl/acosh.cc
-include ../../../include/x86_64/types.h In file included
from ../vecmathlib/pocl/acosh.cc:3: In file included
from ../vecmathlib/pocl/pocl-compat.h:8: In file included
from ../vecmathlib/pocl/../vecmathlib.h:89: ../vecmathlib/pocl/../vec_sse_d=
ouble1.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); }
size>^~~~~~~~~~~~~ ../vecmathlib/pocl/../vec_sse_double1.h:75:5: note:
size>candidate constructor boolvec(bvector_t x): v(x) {}
    ^
../vecmathlib/pocl/../vec_sse_double1.h:76:5: note: candidate
constructor boolvec(bool a): v(a) {}
    ^
../vecmathlib/pocl/../vec_sse_double1.h:461:14: error: conversion from
'int' to 'boolvec_t' (aka 'boolvec<real_t, size>') is ambiguous return
std::isnan(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) {}
    ^
In file included from ../vecmathlib/pocl/acos.cc:3:
In file included from ../vecmathlib/pocl/pocl-compat.h:8:
In file included from ../vecmathlib/pocl/../vecmathlib.h:89:
../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) {}
    ^
../vecmathlib/pocl/../vec_sse_double1.h:461:14: error: conversion from
'int' to 'boolvec_t' (aka 'boolvec<real_t, size>') is ambiguous return
std::isnan(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) {}


Regards,

Oliver

--Sig_/6zPmX=ldJTx0gtKU3Woks2_
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQEcBAEBAgAGBQJR2SK1AAoJEOgBcD7A/5N8jNsIANJ+7Jkk9/Vt8Ir5DliEaQQT
cS2IcGTHGKA6+rtaQpqGy/lxJg3y8EYDfrCndLb21hctgbGUdfn4MRExu1iX5Kzt
megavBE5riakGRBnj+iOs7ElR/eaBPz76/f7v8vLkjSZHJCqvZg8JBKEXSiWP4xq
zKgfrr8NtWJw+el7q1TQ8DQdW0GUTbBSWpBrJ+D/uJvIPU4Wr2a8bLjmuM7lY8ls
mY3m9SW9G/oO5GuF7qeTXc64Y73aQcnEZ2sMljQ35sF8EZe64JB/rDipKDnl3Yc/
OuymGfn7ootI/Kq7QxnWAzsuTAXtfyWH1KugfTDD4/vs07TvW9sJe/p5r+gNpsE=
=3qwG
-----END PGP SIGNATURE-----

--Sig_/6zPmX=ldJTx0gtKU3Woks2_--



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