incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <>
Subject RE: svn commit: r650902 - /stdcxx/trunk/src/num_put.cpp
Date Wed, 23 Apr 2008 23:13:06 GMT

> Eric Lemings wrote:
>> -----Original Message-----
>> From: [] 
>> Author: faridz
>> Date: Wed Apr 23 08:20:07 2008
>> New Revision: 650902
>> URL:
>> Log:
>> 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.
>> Modified:
>>     stdcxx/trunk/src/num_put.cpp
>With just a quick review, this change looks a bit suspicious.  The
>respective overloads for type double are all defined within
>conditional-compile directives.  It follows that float and long double
>overloads would be defined similarly unless I'm missing something.

The overloads on double are in platform specific #ifdef blocks because
they have platform specific code in them (_finite, finite, isfinite). At
least that is the only reason I see for it. So I don't really see the
overloads on float and double outside of platform specific blocks as a
problem as there is no platform specific code in them.

I'm more worried about why the overloads on float and long double are
added at all. If they are only being called from __rw_fmat_infinite(),
and that function only works with a double, then I see no motivation for
the overloads.

I'm also wondering why we provide default implementations of these
functions if we know good and well that the results are wrong (for
platforms that don't define _WIN32, _RWSTD_OS_SUNOS, or fpclassify).
Shouldn't we fail to compile in this case?

The other thing that freaks me out is the implementation of __rw_signbit
on platforms defining _RWSTD_OS_SUNOS. It assumes something similar to
IEEE-745 double representation. This may be a safe assumption for the
time being, but what happens if the user compiles with -fnonstd? Does
this still work?


View raw message