summaryrefslogtreecommitdiff
path: root/gcc/config/c4x
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/c4x')
-rw-r--r--gcc/config/c4x/c4x-protos.h2
-rw-r--r--gcc/config/c4x/c4x.c13
-rw-r--r--gcc/config/c4x/c4x.h3
3 files changed, 8 insertions, 10 deletions
diff --git a/gcc/config/c4x/c4x-protos.h b/gcc/config/c4x/c4x-protos.h
index 27bbbdbb6e7..44f47b65737 100644
--- a/gcc/config/c4x/c4x-protos.h
+++ b/gcc/config/c4x/c4x-protos.h
@@ -50,8 +50,6 @@ extern void c4x_external_ref (const char *);
extern void c4x_file_end (FILE *);
#ifdef TREE_CODE
-extern void c4x_set_default_attributes PARAMS ((tree, tree *));
-
extern void c4x_function_arg_advance PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c
index 6f75aa8709b..c0500bef2f4 100644
--- a/gcc/config/c4x/c4x.c
+++ b/gcc/config/c4x/c4x.c
@@ -190,11 +190,15 @@ static int c4x_r11_set_p PARAMS ((rtx));
static int c4x_rptb_valid_p PARAMS ((rtx, rtx));
static int c4x_label_ref_used_p PARAMS ((rtx, rtx));
static int c4x_valid_type_attribute_p PARAMS ((tree, tree, tree, tree));
+static void c4x_insert_attributes PARAMS ((tree, tree *));
/* Initialize the GCC target structure. */
#undef TARGET_VALID_TYPE_ATTRIBUTE
#define TARGET_VALID_TYPE_ATTRIBUTE c4x_valid_type_attribute_p
+#undef TARGET_INSERT_ATTRIBUTES
+#define TARGET_INSERT_ATTRIBUTES c4x_insert_attributes
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Called to register all of our global variables with the garbage
@@ -4717,14 +4721,13 @@ c4x_check_attribute (attrib, list, decl, attributes)
!= IDENTIFIER_POINTER (DECL_NAME (decl)))
list = TREE_CHAIN (list);
if (list)
- *attributes = chainon (*attributes,
- build_tree_list (get_identifier (attrib),
- TREE_VALUE (list)));
+ *attributes = tree_cons (get_identifier (attrib), TREE_VALUE (list),
+ *attributes);
}
-void
-c4x_set_default_attributes(decl, attributes)
+static void
+c4x_insert_attributes (decl, attributes)
tree decl, *attributes;
{
switch (TREE_CODE (decl))
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 963752649d3..b161d6d7627 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -2443,9 +2443,6 @@ do { \
c4x_init_pragma (&c_lex); \
} while (0)
-#define SET_DEFAULT_DECL_ATTRIBUTES(DECL, ATTRIBUTES) \
- c4x_set_default_attributes (DECL, &ATTRIBUTES)
-
/* Assembler Commands for Alignment. */
#define ASM_OUTPUT_SKIP(FILE, SIZE) \