-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Accept the 80-bit long double in <xutility> #2073
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
415e1ce
Accept the 80-bit long double in <xutility> for Clang
smanna12 9017d1f
fix error
smanna12 a0cbc0c
update patch
smanna12 590c6b8
update patch
smanna12 33a77c2
fix errors
smanna12 af0b826
update patch with #if defined
smanna12 224b0d6
fix typo
smanna12 828f3b4
Add _FINITE macro for _Dtest RETURN
smanna12 fdb0c5c
remove ^^^ from #endif
smanna12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't believe that
_LDtestcould properly handle 80-bitlong double:STL/stl/src/xldtest.cpp
Lines 10 to 12 in bd7adb4
Uh oh!
There was an error while loading. Please reload this page.
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.
_LDtestis handlinglong double:STL/stl/inc/complex
Lines 542 to 557 in bd7adb4
Uh oh!
There was an error while loading. Please reload this page.
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.
I work with Intel C++ compiler team. The Intel C++ compiler uses /Qlong-double option to set the long double type to 80 bits wide. The
_Bit_castfunction in<xutility>header file does not allow 80 bits wide long double.Intel C++ Compiler with /Qlong-double enabled, produces the following compilation error messages when we compile
<complex>header file with/std:c++latestoption:I think the problem is that
_Bit_castis unable to work on a long double (probably because sizeof(long double) > sizeof(unsigned long long)?).I am not sure whether _Bit_cast needs to be fixed, or whether we should be avoiding trying to call it in the first place (generalizes the 80 bit long double check in xutility header file using same logic #1316)
It would be very helpful if we could get any input or assistance in figuring out the right path forward to fix the problem.
Tagging @CaseyCarter, @statementreply, @StephanTLavavej, @sam20908, @simmse for any suggestion. Thank you.
Adding @AaronBallman, @erichkeane for any more information.
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.
I believe there's a separate correctness issue here, because this codepath was being used for 32-bit float as well, and that won't be properly handled by
_LDtest(regardless of whether it's the original 64-bit implementation or a replaced 80-bit implementation).