summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-08 20:05:17 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-08 20:05:17 +0000
commit8ee295a7c68bfb72b1937b767715c9fdbf4bb270 (patch)
tree3f34b8c8d2166c69d334945b678379689aadbfee /gcc/cp
parentb1d10e9386544e3b3357b983ae1fe9f512c1e134 (diff)
downloadgcc-8ee295a7c68bfb72b1937b767715c9fdbf4bb270.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl.c11
-rw-r--r--gcc/cp/friend.c4
3 files changed, 8 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index efdbccd4b98..e07fd96fabc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,12 @@
2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
+ * 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.
+
+2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
+
* decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
calls to decl_attributes.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index c0f90b87e4c..5de71508626 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7220,10 +7220,6 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
DECL_INITIAL (decl) = error_mark_node;
}
-#ifdef SET_DEFAULT_DECL_ATTRIBUTES
- SET_DEFAULT_DECL_ATTRIBUTES (decl, attributes);
-#endif
-
/* Set attributes here so if duplicate decl, will have proper attributes. */
cplus_decl_attributes (decl, attributes, prefix_attributes);
@@ -13436,10 +13432,6 @@ start_function (declspecs, declarator, attrs, flags)
if (!DECL_INITIAL (decl1))
DECL_INITIAL (decl1) = error_mark_node;
-#ifdef SET_DEFAULT_DECL_ATTRIBUTES
- SET_DEFAULT_DECL_ATTRIBUTES (decl1, attrs);
-#endif
-
/* This function exists in static storage.
(This does not mean `static' in the C sense!) */
TREE_STATIC (decl1) = 1;
@@ -13640,8 +13632,7 @@ start_function (declspecs, declarator, attrs, flags)
pushlevel (0);
current_binding_level->parm_flag = 1;
- if (attrs)
- cplus_decl_attributes (decl1, NULL_TREE, attrs);
+ cplus_decl_attributes (decl1, NULL_TREE, attrs);
/* Promote the value to int before returning it. */
if (c_promoting_integer_type_p (restype))
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index 8b2e8f8a4c7..c27a73ecc2c 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -446,10 +446,6 @@ do_friend (ctype, declarator, decl, parmdecls, attrlist,
prefix_attributes = NULL_TREE;
}
-#ifdef SET_DEFAULT_DECL_ATTRIBUTES
- SET_DEFAULT_DECL_ATTRIBUTES (decl, attributes);
-#endif
-
/* Set attributes here so if duplicate decl, will have proper attributes. */
cplus_decl_attributes (decl, attributes, prefix_attributes);