From 8ee295a7c68bfb72b1937b767715c9fdbf4bb270 Mon Sep 17 00:00:00 2001 From: jsm28 Date: Sun, 8 Jul 2001 20:05:17 +0000 Subject: [PATCH] * 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 --- gcc/ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ gcc/Makefile.in | 2 +- gcc/c-common.c | 13 ++----------- gcc/c-decl.c | 8 -------- gcc/config/c4x/c4x-protos.h | 2 -- gcc/config/c4x/c4x.c | 13 ++++++++----- gcc/config/c4x/c4x.h | 3 --- gcc/config/sh/sh-protos.h | 1 - gcc/config/sh/sh.c | 8 ++++++-- gcc/config/sh/sh.h | 3 --- gcc/config/v850/v850-protos.h | 1 - gcc/config/v850/v850.c | 9 +++++++-- gcc/config/v850/v850.h | 4 ---- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/decl.c | 11 +---------- gcc/cp/friend.c | 4 ---- gcc/doc/tm.texi | 13 ++++--------- gcc/target-def.h | 4 +++- gcc/target.h | 3 +++ gcc/tree.c | 16 ++++++++++++---- gcc/tree.h | 1 + 21 files changed, 91 insertions(+), 71 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9269546037d..0dae0789636 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,41 @@ 2001-07-08 Joseph S. Myers + * 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. + +2001-07-08 Joseph S. Myers + * c-common.c (decl_attributes): Only take a single attributes parameter. * c-common.h (decl_attributes): Update prototype. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 84eaf0ca35e..846ddea834e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1236,7 +1236,7 @@ s-under: $(GCC_PASSES) c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \ $(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \ - $(EXPR_H) $(TM_P_H) builtin-types.def + $(EXPR_H) $(TM_P_H) builtin-types.def $(TARGET_H) c-format.o : c-format.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ $(C_COMMON_H) flags.h toplev.h intl.h diagnostic.h diff --git a/gcc/c-common.c b/gcc/c-common.c index 2d56b9e4234..f1ee8b129b7 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. */ #include "tm_p.h" #include "obstack.h" #include "cpplib.h" +#include "target.h" cpp_reader *parse_in; /* Declared in c-lex.h. */ #undef WCHAR_TYPE_SIZE @@ -745,17 +746,7 @@ decl_attributes (node, attributes) else if (TYPE_P (node)) type = node, is_type = 1; -#ifdef PRAGMA_INSERT_ATTRIBUTES - /* If the code in c-pragma.c wants to insert some attributes then - allow it to do so. Do this before allowing machine back ends to - insert attributes, so that they have the opportunity to override - anything done here. */ - PRAGMA_INSERT_ATTRIBUTES (node, & attributes); -#endif - -#ifdef INSERT_ATTRIBUTES - INSERT_ATTRIBUTES (node, & attributes); -#endif + (*targetm.insert_attributes) (node, &attributes); for (a = attributes; a; a = TREE_CHAIN (a)) { diff --git a/gcc/c-decl.c b/gcc/c-decl.c index eba9ee6295a..9d67d342b5e 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3447,10 +3447,6 @@ start_decl (declarator, declspecs, initialized, attributes) if (! flag_no_common || ! TREE_PUBLIC (decl)) DECL_COMMON (decl) = 1; -#ifdef SET_DEFAULT_DECL_ATTRIBUTES - SET_DEFAULT_DECL_ATTRIBUTES (decl, attributes); -#endif - /* Set attributes here so if duplicate decl, will have proper attributes. */ decl_attributes (decl, attributes); @@ -6021,10 +6017,6 @@ start_function (declspecs, declarator, attributes) except for defining how to inline. So set DECL_EXTERNAL in that case. */ DECL_EXTERNAL (decl1) = current_extern_inline; -#ifdef SET_DEFAULT_DECL_ATTRIBUTES - SET_DEFAULT_DECL_ATTRIBUTES (decl1, attributes); -#endif - /* This function exists in static storage. (This does not mean `static' in the C sense!) */ TREE_STATIC (decl1) = 1; 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) \ diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index 4125e327a83..1200ba2f41a 100644 --- a/gcc/config/sh/sh-protos.h +++ b/gcc/config/sh/sh-protos.h @@ -105,7 +105,6 @@ extern rtx sh_va_arg PARAMS ((tree, tree)); #endif /* RTX_CODE */ #ifdef TREE_CODE -extern void sh_pragma_insert_attributes PARAMS ((tree, tree *)); extern tree sh_build_va_list PARAMS ((void)); #endif /* TREE_CODE */ diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d66984080df..b6885a74524 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -155,6 +155,7 @@ static HOST_WIDE_INT rounded_frame_size PARAMS ((int)); static rtx mark_constant_pool_use PARAMS ((rtx)); static int sh_valid_decl_attribute PARAMS ((tree, tree, tree, tree)); static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); +static void sh_insert_attributes PARAMS ((tree, tree *)); /* Initialize the GCC target structure. */ #undef TARGET_VALID_DECL_ATTRIBUTE @@ -163,6 +164,9 @@ static void sh_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT)); #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE sh_output_function_epilogue +#undef TARGET_INSERT_ATTRIBUTES +#define TARGET_INSERT_ATTRIBUTES sh_insert_attributes + struct gcc_target targetm = TARGET_INITIALIZER; /* Print the operand address in x to the stream. */ @@ -4603,8 +4607,8 @@ sh_pr_nosave_low_regs (pfile) /* Generate 'handle_interrupt' attribute for decls */ -void -sh_pragma_insert_attributes (node, attributes) +static void +sh_insert_attributes (node, attributes) tree node; tree * attributes; { diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 29393fd2d93..3f6d3e63265 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -2293,9 +2293,6 @@ extern int current_function_interrupt; for interrupt functions. */ extern struct rtx_def *sp_switch; -#define PRAGMA_INSERT_ATTRIBUTES(node, pattr) \ - sh_pragma_insert_attributes (node, pattr) - extern int rtx_equal_function_value_matters; extern struct rtx_def *fpscr_rtx; diff --git a/gcc/config/v850/v850-protos.h b/gcc/config/v850/v850-protos.h index 9d6d08adc22..83622d4932d 100644 --- a/gcc/config/v850/v850-protos.h +++ b/gcc/config/v850/v850-protos.h @@ -73,7 +73,6 @@ extern rtx v850_va_arg PARAMS ((tree, tree)); #ifdef TREE_CODE extern void v850_encode_data_area PARAMS ((tree)); -extern void v850_set_default_decl_attr PARAMS ((tree)); extern int v850_interrupt_function_p PARAMS ((tree)); extern void v850_output_aligned_bss PARAMS ((FILE *, tree, const char *, int, int)); extern void v850_output_common PARAMS ((FILE *, tree, const char *, int, int)); diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 10f33e20ece..2cbd1155d8c 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -54,6 +54,7 @@ static void substitute_ep_register PARAMS ((rtx, rtx, int, int, rtx *, rtx *)) static int ep_memory_offset PARAMS ((enum machine_mode, int)); static void v850_set_data_area PARAMS ((tree, v850_data_area)); static int v850_valid_decl_attribute PARAMS ((tree, tree, tree, tree)); +static void v850_insert_attributes PARAMS ((tree, tree *)); /* True if the current function has anonymous arguments. */ int current_function_anonymous_args; @@ -86,6 +87,9 @@ static int v850_interrupt_p = FALSE; #undef TARGET_VALID_DECL_ATTRIBUTE #define TARGET_VALID_DECL_ATTRIBUTE v850_valid_decl_attribute +#undef TARGET_INSERT_ATTRIBUTES +#define TARGET_INSERT_ATTRIBUTES v850_insert_attributes + struct gcc_target targetm = TARGET_INITIALIZER; /* Sometimes certain combinations of command options do not make @@ -2653,9 +2657,10 @@ v850_output_local (file, decl, name, size, align) /* Add data area to the given declaration if a ghs data area pragma is currently in effect (#pragma ghs startXXX/endXXX). */ -void -v850_set_default_decl_attr (decl) +static void +v850_insert_attributes (decl, attr_ptr) tree decl; + tree *attr_ptr ATTRIBUTE_UNUSED; { if (data_area_stack && data_area_stack->data_area diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index bde4bb36051..f2a7d7c98cc 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -1486,10 +1486,6 @@ do { char dstr[30]; \ so give the MEM rtx a byte's mode. */ #define FUNCTION_MODE QImode -/* A C statement that assigns default attributes to a newly created DECL. */ -#define SET_DEFAULT_DECL_ATTRIBUTES(decl, attr) \ - v850_set_default_decl_attr (decl) - /* Tell compiler we want to support GHS pragmas */ #define REGISTER_TARGET_PRAGMAS(PFILE) do { \ cpp_register_pragma_space (PFILE, "ghs"); \ 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 + * 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 + * 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); diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 4cddb831314..78d052e02c2 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -8413,10 +8413,8 @@ as the expansion of @code{TARGET_MERGE_DECL_ATTRIBUTES}. This is done in @file{i386/cygwin.h} and @file{i386/i386.c}, for example. @end deftypefn -@table @code -@findex INSERT_ATTRIBUTES -@item INSERT_ATTRIBUTES (@var{node}, @var{attr_ptr}) -Define this macro if you want to be able to add attributes to a decl +@deftypefn {Target Hook} void TARGET_INSERT_ATTRIBUTES (tree @var{node}, tree *@var{attr_ptr}) +Define this target hook if you want to be able to add attributes to a decl when it is being created. This is normally useful for back ends which wish to implement a pragma by using the attributes which correspond to the pragma's effect. The @var{node} argument is the decl which is being @@ -8426,12 +8424,9 @@ shared with other decls, but attributes may be chained on the head of the list and @code{*@var{attr_ptr}} modified to point to the new attributes, or a copy of the list may be made if further changes are needed. +@end deftypefn -@findex SET_DEFAULT_DECL_ATTRIBUTES -@item SET_DEFAULT_DECL_ATTRIBUTES (@var{decl}, @var{attributes}) -If defined, a C statement that assigns default attributes to -newly defined @var{decl}. - +@table @code @findex DOLLARS_IN_IDENTIFIERS @item DOLLARS_IN_IDENTIFIERS Define this macro to control use of the character @samp{$} in identifier diff --git a/gcc/target-def.h b/gcc/target-def.h index ec0b6606f04..dbcaecf59cd 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -43,6 +43,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TARGET_VALID_TYPE_ATTRIBUTE default_valid_attribute_p #define TARGET_COMP_TYPE_ATTRIBUTES default_comp_type_attributes #define TARGET_SET_DEFAULT_TYPE_ATTRIBUTES default_set_default_type_attributes +#define TARGET_INSERT_ATTRIBUTES default_insert_attributes /* The whole shebang. */ #define TARGET_INITIALIZER \ @@ -53,5 +54,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. TARGET_VALID_DECL_ATTRIBUTE, \ TARGET_VALID_TYPE_ATTRIBUTE, \ TARGET_COMP_TYPE_ATTRIBUTES, \ - TARGET_SET_DEFAULT_TYPE_ATTRIBUTES \ + TARGET_SET_DEFAULT_TYPE_ATTRIBUTES, \ + TARGET_INSERT_ATTRIBUTES \ } diff --git a/gcc/target.h b/gcc/target.h index 45143abb3de..20714c9e0d8 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -87,6 +87,9 @@ struct gcc_target /* Assign default attributes to the newly defined TYPE. */ void (* set_default_type_attributes) PARAMS ((tree type)); + + /* Insert attributes on the newly created DECL. */ + void (* insert_attributes) PARAMS ((tree decl, tree *attributes)); }; extern struct gcc_target targetm; diff --git a/gcc/tree.c b/gcc/tree.c index a48724b45d8..7ad066538d0 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -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. */ diff --git a/gcc/tree.h b/gcc/tree.h index 9a5fb6a5137..ec7a2874667 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2046,6 +2046,7 @@ extern tree merge_type_attributes PARAMS ((tree, tree)); extern int default_valid_attribute_p PARAMS ((tree, tree, tree, tree)); extern int default_comp_type_attributes PARAMS ((tree, tree)); extern void default_set_default_type_attributes PARAMS ((tree)); +extern void default_insert_attributes PARAMS ((tree, tree *)); /* Split a list of declspecs and attributes into two. */ -- 2.11.4.GIT