diff options
author | Jakub Jelinek <jakub@redhat.com> | 2022-10-07 08:59:05 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2022-10-07 09:00:00 +0200 |
commit | 348e46fa8cba960c23170673bfc0c1b4fb384975 (patch) | |
tree | 4bd6cf6081627fe589321270450088cb12c256c2 /fixincludes/inclhack.def | |
parent | 62ec780ac0b4d109f2a3c8c4597cb19a82f6188d (diff) | |
download | gcc-348e46fa8cba960c23170673bfc0c1b4fb384975.zip gcc-348e46fa8cba960c23170673bfc0c1b4fb384975.tar.gz gcc-348e46fa8cba960c23170673bfc0c1b4fb384975.tar.bz2 |
fixincludes: Deal also with the _Float128x cases [PR107059]
On Wed, Sep 28, 2022 at 08:19:43PM +0200, Jakub Jelinek via Gcc-patches wrote:
> Another case are the following 3 snippets:
> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus
> # error "_Float128X supported but no constant suffix"
> # else
> # define __f128x(x) x##f128x
> # endif
> ...
> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus
> # error "_Float128X supported but no complex type"
> # else
> # define __CFLOAT128X _Complex _Float128x
> # endif
> ...
> # if !__GNUC_PREREQ (7, 0) || defined __cplusplus
> # error "_Float128x supported but no type"
> # endif
> but as no target has _Float128x right now and don't see it
> coming soon, it isn't a big deal (on the glibc side it is of
> course ok to adjust those).
This incremental patch deals handles the above 3 cases, so we
fixinclude what glibc itself changed too.
2022-10-07 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/107059
* inclhack.def (glibc_cxx_floatn_5): New.
* fixincl.x: Regenerated.
* tests/base/bits/floatn.h: Regenerated.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r-- | fixincludes/inclhack.def | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 71f1c47..d463747 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -2131,6 +2131,23 @@ fix = { EOT; }; +fix = { + hackname = glibc_cxx_floatn_5; + files = bits/floatn.h, bits/floatn-common.h, "*/bits/floatn.h", "*/bits/floatn-common.h"; + select = "^([ \t]*#[ \t]*if !__GNUC_PREREQ \\(7, 0\\) \\|\\| )defined __cplusplus\n" + "([ \t]*#[ \t]+error \"_Float128[xX] supported but no )"; + c_fix = format; + c_fix_arg = "%1(defined __cplusplus && !__GNUC_PREREQ (13, 0))\n%2"; + test_text = <<-EOT + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus + # error "_Float128X supported but no constant suffix" + # endif + # if !__GNUC_PREREQ (7, 0) || defined __cplusplus + # error "_Float128x supported but no type" + # endif + EOT; +}; + /* glibc-2.3.5 defines pthread mutex initializers incorrectly, * so we replace them with versions that correspond to the * definition. |