[Bug c++/49813] [C++0x] sinh vs asinh vs constexpr
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Mon Jul 25 19:59:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49813
--- Comment #41 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-07-25 19:58:52 UTC ---
The testcase in Comment #30 has the types wrong, the below is a corrected
version (the substance of the issue doesn't change at all). I'm also thinking
of checking in the library bits with a temporary workaround of the form:
inline constexpr bool
isinf(long double __x)
{ return fpclassify(__x) == FP_INFINITE; }
which works.
/////////////
inline constexpr bool
isinf(long double __x)
{ return __builtin_isinf(__x); }
inline constexpr bool
isinf(double __x)
{ return __builtin_isinf(__x); }
inline constexpr bool
isnan(long double __x)
{ return __builtin_isnan(__x); }
int main()
{
constexpr int i1 = __builtin_isinf(1.l); // Ok.
constexpr bool b2 = isinf(1.l); // Error.
constexpr bool b3 = isinf(1.); // Ok.
constexpr bool b4 = isnan(1.l); // Ok.
}
More information about the Gcc-bugs
mailing list