-
Notifications
You must be signed in to change notification settings - Fork 187
Fix several truncations and warnings in numerics #253
Conversation
@@ -53,10 +53,12 @@ int main(int, char**) | |||
test<__int128_t>(0); | |||
test<__uint128_t>(0); | |||
#endif | |||
#if !defined(_MSC_VER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these disabled on MSVC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complaints of division by zero. I was going to @ you and ask about this one. Should we include host <cmath>
and use some macro for INFINITY?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we silence the warning with a pragma?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an outright error:
C:\Users\wmaxey\Documents\temp\libcudacxx\.upstream-tests\test\std\language.support\support.limits\limits\numeric.limits.members\infinity.pass.cpp(56): error #39-D: division by zero
C:\Users\wmaxey\Documents\temp\libcudacxx\.upstream-tests\test\std\language.support\support.limits\limits\numeric.limits.members\infinity.pass.cpp(57): error #39-D: division by zero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Okay.
Yeah let's use INFINITY. I'd rather not have this commented out on MSVC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in latest commit and tested on MSVC 14.30/16/12.
This fixes some longstanding MSVC issues. No functional impact, but resolves a few warnings making tests build clean.
https://nvbugswb.nvidia.com/NVBugs5/redir.aspx?url=/3556730