aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-decl.cc')
-rw-r--r--gcc/c/c-decl.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc
index d388e12..248d1bb 100644
--- a/gcc/c/c-decl.cc
+++ b/gcc/c/c-decl.cc
@@ -4633,7 +4633,7 @@ handle_std_noreturn_attribute (tree *node, tree name, tree args,
}
/* Table of supported standard (C23) attributes. */
-const struct attribute_spec std_attribute_table[] =
+static const attribute_spec std_attributes[] =
{
/* { name, min_len, max_len, decl_req, type_req, fn_type_req,
affects_type_identity, handler, exclude } */
@@ -4648,8 +4648,12 @@ const struct attribute_spec std_attribute_table[] =
{ "nodiscard", 0, 1, false, false, false, false,
handle_nodiscard_attribute, NULL },
{ "noreturn", 0, 0, false, false, false, false,
- handle_std_noreturn_attribute, NULL },
- { NULL, 0, 0, false, false, false, false, NULL, NULL }
+ handle_std_noreturn_attribute, NULL }
+};
+
+const scoped_attribute_specs std_attribute_table =
+{
+ nullptr, std_attributes
};
/* Create the predefined scalar types of C,
@@ -4665,8 +4669,6 @@ c_init_decl_processing (void)
/* Initialize reserved words for parser. */
c_parse_init ();
- register_scoped_attributes (std_attribute_table, NULL);
-
current_function_decl = NULL_TREE;
gcc_obstack_init (&parser_obstack);