From commits-return-2808-apmail-stdcxx-commits-archive=stdcxx.apache.org@stdcxx.apache.org Wed Apr 23 20:04:38 2008 Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 39543 invoked from network); 23 Apr 2008 20:04:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 20:04:38 -0000 Received: (qmail 37136 invoked by uid 500); 23 Apr 2008 20:04:40 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 37125 invoked by uid 500); 23 Apr 2008 20:04:40 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 37113 invoked by uid 99); 23 Apr 2008 20:04:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 13:04:40 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 20:04:04 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C67BD1A9842; Wed, 23 Apr 2008 13:04:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r651034 - /stdcxx/branches/4.2.x/src/num_put.cpp Date: Wed, 23 Apr 2008 20:04:16 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080423200417.C67BD1A9842@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Wed Apr 23 13:04:15 2008 New Revision: 651034 URL: http://svn.apache.org/viewvc?rev=651034&view=rev Log: 2008-04-23 Martin Sebor Merged revs 650902 and 650933 from trunk. * src/num_put.cpp (__rw_isqnan, __rw_issnan, __rw_fmat_infinite): Silence HP aCC remark #2826-D: parameter was never referenced. 2008-04-23 Farid Zaripov STDCXX-880 * src/num_put.cpp: Added simple overloads of the __rw_isfinite(), __rw_signbit(), __rw_isinf(), __rw_isnan(), __rw_isqnan(), __rw_issnan() for float and long double types. 2008-04-23 Farid Zaripov STDCXX-880 * src/num_put.cpp [_RWSTD_DBL_SIZE == _RWSTD_LDBL_SIZE]: Call double type overload from long double type overload when sizeof (double) == sizeof (long double). Modified: stdcxx/branches/4.2.x/src/num_put.cpp Modified: stdcxx/branches/4.2.x/src/num_put.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/num_put.cpp?rev=651034&r1=651033&r2=651034&view=diff ============================================================================== --- stdcxx/branches/4.2.x/src/num_put.cpp (original) +++ stdcxx/branches/4.2.x/src/num_put.cpp Wed Apr 23 13:04:15 2008 @@ -160,9 +160,9 @@ inline bool __rw_isnan (double val) { return !!isnan (val); } -inline bool __rw_isqnan (double val) { return false; } +inline bool __rw_isqnan (double) { return false; } -inline bool __rw_issnan (double val) { return false; } +inline bool __rw_issnan (double) { return false; } #else @@ -181,11 +181,61 @@ #endif +inline bool __rw_isfinite (float) { return true; } + +inline bool __rw_signbit (float) { return false; } + +inline bool __rw_isinf (float) { return false; } + +inline bool __rw_isnan (float) { return false; } + +inline bool __rw_isqnan (float) { return false; } + +inline bool __rw_issnan (float) { return false; } + + +#ifndef _RWSTD_NO_LONG_DOUBLE + +# if _RWSTD_DBL_SIZE == _RWSTD_LDBL_SIZE + +inline bool __rw_isfinite (long double x) { return __rw_isfinite (double (x)); } + +inline bool __rw_signbit (long double x) { return __rw_signbit (double (x)); } + +inline bool __rw_isinf (long double x) { return __rw_isinf (double (x)); } + +inline bool __rw_isnan (long double x) { return __rw_isnan (double (x)); } + +inline bool __rw_isqnan (long double x) { return __rw_isqnan (double (x)); } + +inline bool __rw_issnan (long double x) { return __rw_issnan (double (x)); } + +# else // _RWSTD_DBL_SIZE != _RWSTD_LDBL_SIZE + +inline bool __rw_isfinite (long double) { return true; } + +inline bool __rw_signbit (long double) { return false; } + +inline bool __rw_isinf (long double) { return false; } + +inline bool __rw_isnan (long double) { return false; } + +inline bool __rw_isqnan (long double) { return false; } + +inline bool __rw_issnan (long double) { return false; } + +# endif // _RWSTD_DBL_SIZE == _RWSTD_LDBL_SIZE + +#endif // _RWSTD_NO_LONG_DOUBLE + + static int __rw_fmat_infinite (char *buf, size_t bufsize, double val, unsigned flags) { _RWSTD_ASSERT (!__rw_isfinite (val)); _RWSTD_ASSERT (5 <= bufsize); + + _RWSTD_UNUSED (bufsize); char* end = buf; const bool cap = !!(flags & _RWSTD_IOS_UPPERCASE);