From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3174 invoked by alias); 25 Jul 2011 19:59:08 -0000 Received: (qmail 3164 invoked by uid 22791); 25 Jul 2011 19:59:07 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 19:58:54 +0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49813] [C++0x] sinh vs asinh vs constexpr X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 25 Jul 2011 19:59:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg02199.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49813 --- Comment #41 from Paolo Carlini 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. }