diff options
author | Jason Merrill <jason@redhat.com> | 2010-05-05 19:33:11 +0000 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2010-05-05 19:33:11 +0000 |
commit | 6a9c48de6bcd303f7238c965a06a857f37872cf7 (patch) | |
tree | 2f0d1539c4a77f271f5a52bc32ed5f1726956909 /gcc/c-common.c | |
parent | 506fc4de9cb57e0cca4fd63766444fdd0bd16c20 (diff) |
PR testsuite/43758
* target.h (struct gcc_target): Add attribute_takes_identifier_p.
* target_def.h (TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.
(TARGET_INITIALIZER): Use it.
* c-common.c (attribute_takes_identifier_p): Call it.
* c-common.h: Update prototype.
* config/rs6000/rs6000.c (rs6000_attribute_takes_identifier_p): New.
(TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@159079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 17183448d40..6fa577c293a 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -5816,11 +5816,14 @@ c_init_attributes (void) identifier as an argument, so the front end shouldn't look it up. */ bool -attribute_takes_identifier_p (tree attr_id) +attribute_takes_identifier_p (const_tree attr_id) { - return (is_attribute_p ("mode", attr_id) - || is_attribute_p ("format", attr_id) - || is_attribute_p ("cleanup", attr_id)); + if (is_attribute_p ("mode", attr_id) + || is_attribute_p ("format", attr_id) + || is_attribute_p ("cleanup", attr_id)) + return true; + else + return targetm.attribute_takes_identifier_p (attr_id); } /* Attribute handlers common to C front ends. */ |