aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-12-05 17:53:50 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2023-12-05 17:53:50 +0000
commit1dad3df1e7f3fd73f157f88561ef424b6853d960 (patch)
tree57dd6e31d5b9a186e95cf7591397f741e8eb04ca /gcc/jit
parent3cd73543a1122d3c81409e3e9a26c3e94c3d324f (diff)
downloadgcc-1dad3df1e7f3fd73f157f88561ef424b6853d960.zip
gcc-1dad3df1e7f3fd73f157f88561ef424b6853d960.tar.gz
gcc-1dad3df1e7f3fd73f157f88561ef424b6853d960.tar.bz2
Restore build with GCC 4.8 to GCC 5
GCC 5 and earlier applied array-to-pointer decay too early, which affected the new attribute namespace code. A reduced example of the construct that the attribute code uses is: struct S { template<__SIZE_TYPE__ N> S(int (&)[N]); }; struct T { int a; S b; }; int a[] = { 1 }; T t = { 1, a }; This was fixed by f85e1317f8ea933f5c615680353bd646f480f7d3 (PR 16333 et al). This patch tries to add a minimally-invasive workaround. gcc/ada/ * gcc-interface/utils.cc (gnat_internal_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/ * attribs.cc (handle_ignored_attributes_option): Add extra braces to work around PR 16333 in older compilers. * config/aarch64/aarch64.cc (aarch64_gnu_attribute_table): Likewise. (aarch64_arm_attribute_table): Likewise. * config/arm/arm.cc (arm_gnu_attribute_table): Likewise. * config/i386/i386-options.cc (ix86_gnu_attribute_table): Likewise. * config/ia64/ia64.cc (ia64_gnu_attribute_table): Likewise. * config/rs6000/rs6000.cc (rs6000_gnu_attribute_table): Likewise. * target-def.h (TARGET_GNU_ATTRIBUTES): Likewise. * genhooks.cc (emit_init_macros): Likewise, when emitting the instantiation of TARGET_ATTRIBUTE_TABLE. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Likewise, when instantiating LANG_HOOKS_ATTRIBUTE_TABLE. (LANG_HOOKS_ATTRIBUTE_TABLE): Define to be empty by default. * target.def (attribute_table): Likewise. gcc/c-family/ * c-attribs.cc (c_common_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/c/ * c-decl.cc (std_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/cp/ * tree.cc (cxx_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/d/ * d-attribs.cc (d_langhook_common_attribute_table): Add extra braces to work around PR 16333 in older compilers. (d_langhook_gnu_attribute_table): Likewise. gcc/fortran/ * f95-lang.cc (gfc_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/jit/ * dummy-frontend.cc (jit_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. (jit_format_attribute_table): Likewise. gcc/lto/ * lto-lang.cc (lto_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. (lto_format_attribute_table): Likewise.
Diffstat (limited to 'gcc/jit')
-rw-r--r--gcc/jit/dummy-frontend.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc
index 61cc0e1..1ea6ad3 100644
--- a/gcc/jit/dummy-frontend.cc
+++ b/gcc/jit/dummy-frontend.cc
@@ -133,7 +133,7 @@ static const attribute_spec jit_gnu_attributes[] =
static const scoped_attribute_specs jit_gnu_attribute_table =
{
- "gnu", jit_gnu_attributes
+ "gnu", { jit_gnu_attributes }
};
/* Give the specifications for the format attributes, used by C and all
@@ -151,7 +151,7 @@ static const attribute_spec jit_format_attributes[] =
static const scoped_attribute_specs jit_format_attribute_table =
{
- "gnu", jit_format_attributes
+ "gnu", { jit_format_attributes }
};
static const scoped_attribute_specs *const jit_attribute_table[] =