Commit e6ca6782 by Eric Botcazou Committed by Eric Botcazou

utils.c (gnat_internal_attribute_table): Add support for stack_protect attribute.

	* gcc-interface/utils.c (gnat_internal_attribute_table): Add support
	for stack_protect attribute.
	(handle_stack_protect_attribute): New static function.

From-SVN: r271680
parent eabf2b44
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_internal_attribute_table): Add support
for stack_protect attribute.
(handle_stack_protect_attribute): New static function.
2019-05-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (intrin_arglists_compatible_p): Do not return
false if the internal builtin uses a variable list.
......
......@@ -90,6 +90,7 @@ static tree handle_novops_attribute (tree *, tree, tree, int, bool *);
static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *);
static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *);
static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
static tree handle_stack_protect_attribute (tree *, tree, tree, int, bool *);
static tree handle_noinline_attribute (tree *, tree, tree, int, bool *);
static tree handle_noclone_attribute (tree *, tree, tree, int, bool *);
static tree handle_leaf_attribute (tree *, tree, tree, int, bool *);
......@@ -123,6 +124,8 @@ const struct attribute_spec gnat_internal_attribute_table[] =
handle_sentinel_attribute, NULL },
{ "noreturn", 0, 0, true, false, false, false,
handle_noreturn_attribute, NULL },
{ "stack_protect",0, 0, true, false, false, false,
handle_stack_protect_attribute, NULL },
{ "noinline", 0, 0, true, false, false, false,
handle_noinline_attribute, NULL },
{ "noclone", 0, 0, true, false, false, false,
......@@ -6357,6 +6360,22 @@ handle_noinline_attribute (tree *node, tree name,
return NULL_TREE;
}
/* Handle a "stack_protect" attribute; arguments as in
struct attribute_spec.handler. */
static tree
handle_stack_protect_attribute (tree *node, tree name, tree, int,
bool *no_add_attrs)
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qE attribute ignored", name);
*no_add_attrs = true;
}
return NULL_TREE;
}
/* Handle a "noclone" attribute; arguments as in
struct attribute_spec.handler. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment