[Bug c++/49813] [C++0x] sinh vs asinh vs constexpr
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 22 11:41:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49813
--- Comment #16 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-22 11:40:07 UTC ---
(In reply to comment #14)
> There is also a using ::asinhf but still std:: provides an overload.
So? This is what C++0x says we should have.
As regards a complete testcase, I gave two, one using <math.h>, one a *real
world* piece of C++0x code, compiled with -std=c++0x on Linux.
#include <cmath>
int main()
{
constexpr double cds = std::sinh(1.0); // Ok
constexpr double cdas = std::asinh(1.0); // Not Ok.
double das = std::asinh(1.0); // Ok.
}
we don't want those inconsistencies.
By the way, I find your:
constexpr double cdas = __builtin_asinh(1.0);
very interesting. Looks like really the front-end is doing something strange
wrt declarations of C99 functions: if <math.h> provided by glibc is include
then the declarations are definitely there, in strict c++0x mode too, but the
front-end is trying to invent something on its own, disregards those
declarations somehow, but *only* when dealing with constexpr data, not
otherwise.
More information about the Gcc-bugs
mailing list