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: Mon, 25 Jul 2011 19:58:53 +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 #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.
}