lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] xanadu/remove-ISOC99_SOURCE-def


From: Greg Chicares
Subject: Re: [lmi] xanadu/remove-ISOC99_SOURCE-def
Date: Wed, 25 May 2022 00:24:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 5/22/22 20:33, Greg Chicares wrote:
> On 5/22/22 18:56, Vadim Zeitlin wrote:
[...which snprintf() to use for msw? big snip...] 
>>  However this condition also contains the following subexpression:
>> 
>>      || (defined (__cplusplus) && __cplusplus >= 201103L && 
>> __MSVCRT_VERSION__ < 0xE00) \
>> 
>> which seems to indicate that it's not needed to enable MinGW own
>> implementation when using MSVC CRT >= 1400 (which will always be the case
>> nowadays), which has a (more) standard compliant snprintf() of its own.
>> 
>>  I also hoped that if there were any problems with using that snprintf(),
>> they would be uncovered by the unit tests, notably snprintf_test.cpp, but
>> it passes without problems.
> 
> The expm1() and log1p work I've recently done elsewhere suggests
> to me that if an msvcrt function is known to be defective (whether
> in the latest version or in some previous version that could still
> be circulating in the wild), and we have a replacement that
> demonstrably lacks those known defects, then it's better to favor
> the replacement, forever.

I've changed my mind after seeing that they put a library function
into production that apparently could be correct only for special
cases like +/inf and NaN (documented via the commit-revert idiom).

I still trust Keith Marshall's implementation, but I can't trust
the MinGW-w64 project not to break it. They're less likely to
break msvcrt because they don't have a copy of the source.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]