This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49813] [C++0x] sinh vs asinh vs constexpr
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 Jul 2011 11:41:03 +0000
- Subject: [Bug c++/49813] [C++0x] sinh vs asinh vs constexpr
- Auto-submitted: auto-generated
- References: <bug-49813-4@http.gcc.gnu.org/bugzilla/>
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.