diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-05-28 08:51:35 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-05-28 08:51:35 +0000 |
commit | abdb813b23c039aa2b8f3f66cbbe618c12fefe2b (patch) | |
tree | ee7a3e879b98501cf641b2420f50060e76c782a3 /gcc | |
parent | 5ca5ef68709f317927a055a610bfcec6e4ec0172 (diff) | |
download | gcc-abdb813b23c039aa2b8f3f66cbbe618c12fefe2b.zip gcc-abdb813b23c039aa2b8f3f66cbbe618c12fefe2b.tar.gz gcc-abdb813b23c039aa2b8f3f66cbbe618c12fefe2b.tar.bz2 |
* gcc-interface/utils.c (handle_stack_protect_attribute): Move around.
From-SVN: r271694
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 32 |
2 files changed, 20 insertions, 16 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e0f3d0a..3b60a92 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 2019-05-28 Eric Botcazou <ebotcazou@adacore.com> + * gcc-interface/utils.c (handle_stack_protect_attribute): Move around. + +2019-05-28 Eric Botcazou <ebotcazou@adacore.com> + * doc/gnat_rm/implementation_defined_pragmas.rst (Machine_Attribute): Document additional optional parameters. * sem_prag.adb (Analyze_Pragma) <Pragma_Machine_Attribute>: Accept diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index a74a2e2..d9c9209 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -6364,6 +6364,22 @@ handle_noreturn_attribute (tree *node, tree name, tree ARG_UNUSED (args), 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 "noinline" attribute; arguments as in struct attribute_spec.handler. */ @@ -6392,22 +6408,6 @@ 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. */ |