gcc/LoongArch-Allow-attributes-in-non-gnu-namespaces.diff

24 lines
826 B
Diff

diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
index 6be0d80b3..12af95f70 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -7917,15 +7917,13 @@ loongarch_handle_model_attribute (tree *node, tree name, tree arg, int,
return NULL_TREE;
}
-static const struct attribute_spec loongarch_attribute_table[] =
+TARGET_GNU_ATTRIBUTES (loongarch_attribute_table,
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
{ "model", 1, 1, true, false, false, false,
- loongarch_handle_model_attribute, NULL },
- /* The last attribute spec is set to be NULL. */
- {}
-};
+ loongarch_handle_model_attribute, NULL }
+});
bool
loongarch_use_anchors_for_symbol_p (const_rtx symbol)