diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 07:51:59 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 07:51:59 +0000 |
commit | cb56012690ae1b8f203a61decdcb5d281db2431c (patch) | |
tree | 58bc341cb04d6000b923fc1d7edb78289d9f2938 /gcc/c-common.c | |
parent | 84836637fcb8e7c3aea3b25f4cbf17a59cfca553 (diff) | |
download | gcc-cb56012690ae1b8f203a61decdcb5d281db2431c.tar.gz |
2009-07-27 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 150103
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@150104 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index aaa64351fd4..0ebb9f1b1f5 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -482,6 +482,7 @@ static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *); static tree handle_hot_attribute (tree *, tree, tree, int, bool *); static tree handle_cold_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_always_inline_attribute (tree *, tree, tree, int, bool *); static tree handle_gnu_inline_attribute (tree *, tree, tree, int, bool *); @@ -733,6 +734,8 @@ const struct attribute_spec c_common_attribute_table[] = handle_noreturn_attribute }, { "noinline", 0, 0, true, false, false, handle_noinline_attribute }, + { "noclone", 0, 0, true, false, false, + handle_noclone_attribute }, { "always_inline", 0, 0, true, false, false, handle_always_inline_attribute }, { "gnu_inline", 0, 0, true, false, false, @@ -5913,6 +5916,23 @@ handle_noinline_attribute (tree *node, tree name, return NULL_TREE; } +/* Handle a "noclone" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_noclone_attribute (tree *node, tree name, + tree ARG_UNUSED (args), + int ARG_UNUSED (flags), 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 "always_inline" attribute; arguments as in struct attribute_spec.handler. */ |