-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider not using _ecvt_s #423
Comments
|
http://www.cplusplus.com/reference/cmath/signbit/
So, I compile with -O3, so I presume it will be optimised away indeed, just not the branch you expect. |
Good catch. Does changing if (const_check(sizeof(signbit(x)) == sizeof(int))) to if (const_check(sizeof(signbit(x)) == sizeof(int)) || const_check(sizeof(signbit(x)) == sizeof(bool))) solve the problem? |
Yes, with that change I can't find any traces of _ecvt_s in the binary and it works. |
Fixed in def6874. |
(cherry picked from commit def6874)
This happens on Windows XP if compiled with MinGW, as XP's msvcrt.dll is too old and doesn't include that function, and MinGW doesn't use the static runtime library for copyright reasons.
_ecvt_s is used in implementation of
bool isnegative(double x)
("Portable version of signbit").Probably it's better to just use
signbit
if it's available. MinGW defines this macro inmath.h
.The text was updated successfully, but these errors were encountered: