-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
castxml: Fix
__float128
simulation with -std=gnu++{11,14}
again
The approach used in commit 1414278 (castxml: Fix `__float128` simulation with `-std=gnu++{11,14}`, 2016-01-25) allowed Clang to use its own builtin `__float128` type when it is available. However, Clang does not really implement this builtin and issues diagnostics when it is used in some contexts (e.g. as a data member). Instead we need to provide our own approximation of the builtin in all cases. Avoid a conflict with the Clang builtin by using the preprocessor to rename the type to `__castxml__float128`. Then replace this name with `__float128` during output. GitHub-Issue: #59
- Loading branch information
Showing
7 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
^<\?xml version="1.0"\?> | ||
<GCC_XML[^>]*> | ||
<Function id="_1" name="start" returns="_2" context="_3" location="f1:1" file="f1" line="1" mangled=""> | ||
<Argument type="_2" location="f1:1" file="f1" line="1"/> | ||
<Namespace id="_1" name="start" context="_2" members="_3 _4 _5"/> | ||
<Function id="_3" name="f" returns="_6" context="_1" location="f1:3" file="f1" line="3" mangled=""> | ||
<Argument type="_6" location="f1:3" file="f1" line="3"/> | ||
</Function> | ||
<FundamentalType id="_2" name="__float128" size="128" align="128"/> | ||
<Namespace id="_3" name="::"/> | ||
<Variable id="_4" name="v" type="_6" init="" context="_1" location="f1:4" file="f1" line="4" mangled="[^"]*"/> | ||
<Variable id="_5" name="pa" type="_7" context="_1" location="f1:5" file="f1" line="5" mangled="[^"]*"/> | ||
<FundamentalType id="_6" name="__float128" size="128" align="128"/> | ||
<PointerType id="_7" type="_8"/> | ||
<Namespace id="_2" name="::"/> | ||
<Struct id="_8" name="A<__float128>" context="_2" location="f1:1" file="f1" line="1" incomplete="1"/> | ||
<File id="f1" name=".*/test/input/GNU-float128.cxx"/> | ||
</GCC_XML>$ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
__float128 start(__float128); | ||
__float128 v; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
__float128 start(__float128); | ||
template <typename T> struct A; | ||
namespace start { | ||
__float128 f(__float128); | ||
__float128 v; | ||
A<__float128>* pa; | ||
} |