diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2001-07-08 21:05:17 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2001-07-08 21:05:17 +0100 |
commit | 12a68f1f0813ad69003fa454a916ba4380f1e570 (patch) | |
tree | 3f34b8c8d2166c69d334945b678379689aadbfee /gcc/tree.c | |
parent | f7a4cec096b0476bbe39b44fbe3391d11f598728 (diff) | |
download | gcc-12a68f1f0813ad69003fa454a916ba4380f1e570.zip gcc-12a68f1f0813ad69003fa454a916ba4380f1e570.tar.gz gcc-12a68f1f0813ad69003fa454a916ba4380f1e570.tar.bz2 |
target.h (struct gcc_target): Add insert_attributes.
* target.h (struct gcc_target): Add insert_attributes.
* target-def.h (TARGET_INSERT_ATTRIBUTES): Define.
(TARGET_INITIALIZER): Update.
* tree.c, tree.h (default_insert_attributes): New function.
Update comments on other default functions to refer to targetm,
not target.
* doc/tm.texi (INSERT_ATTRIBUTES): Update to document
TARGET_INSERT_ATTRIBUTES.
(SET_DEFAULT_DECL_ATTRIBUTES): Remove.
* c-common.c (decl_attributes): Use targetm.insert_attributes.
Don't use PRAGMA_INSERT_ATTRIBUTES.
* Makefile.in (c-common.o): Depend on $(TARGET_H).
* c-decl.c (start_decl, start_function): Don't call
SET_DEFAULT_DECL_ATTRIBUTES.
* config/c4x/c4x.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define.
* config/c4x/c4x-protos.h (c4x_set_default_attributes): Don't
declare.
* config/c4x/c4x.c (TARGET_INSERT_ATTRIBUTES): Define.
(c4x_check_attribute): Avoid modifying attribute list itself.
(c4x_set_default_attributes): Rename to c4x_insert_attributes.
Make static.
* config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Don't define.
* config/sh/sh-protos.h (sh_pragma_insert_attributes): Don't
declare.
* config/sh/sh.c (TARGET_INSERT_ATTRIBUTES): Define.
(sh_pragma_insert_attributes): Rename to sh_insert_attributes.
Make static.
* config/v850/v850.h (SET_DEFAULT_DECL_ATTRIBUTES): Don't define.
* config/v850/v850-protos.h (v850_set_default_decl_attr): Don't
declare.
* config/v850/v850.c (TARGET_INSERT_ATTRIBUTES): Define.
(v850_set_default_decl_attr): Rename to v850_insert_attributes.
Adjust parameters. Make static.
cp:
* decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
(start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
cplus_decl_attributes even if attrs is NULL.
* friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
From-SVN: r43851
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -2707,8 +2707,8 @@ build_type_attribute_variant (ttype, attribute) return ttype; } -/* Default value of target.valid_decl_attribute_p and - target.valid_type_attribute_p that always returns false. */ +/* Default value of targetm.valid_decl_attribute_p and + targetm.valid_type_attribute_p that always returns false. */ int default_valid_attribute_p PARAMS ((attr_name, attr_args, decl, type)) @@ -2720,7 +2720,7 @@ default_valid_attribute_p PARAMS ((attr_name, attr_args, decl, type)) return 0; } -/* Default value of target.comp_type_attributes that always returns 1. */ +/* Default value of targetm.comp_type_attributes that always returns 1. */ int default_comp_type_attributes (type1, type2) @@ -2730,7 +2730,7 @@ default_comp_type_attributes (type1, type2) return 1; } -/* Default version of target.set_default_type_attributes that always does +/* Default version of targetm.set_default_type_attributes that always does nothing. */ void @@ -2739,6 +2739,14 @@ default_set_default_type_attributes (type) { } +/* Default version of targetm.insert_attributes that always does nothing. */ +void +default_insert_attributes (decl, attr_ptr) + tree decl ATTRIBUTE_UNUSED; + tree *attr_ptr ATTRIBUTE_UNUSED; +{ +} + /* Return 1 if ATTR_NAME and ATTR_ARGS is valid for either declaration DECL or type TYPE and 0 otherwise. Validity is determined the target functions valid_decl_attribute and valid_machine_attribute. */ |