From: Neil Booth Date: Wed, 27 Jun 2001 17:40:01 +0000 (+0000) Subject: system.h (TARGET_ESC): Move to ... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8b997e8c4a0e1fb517f2d270f3ca3a990b01c24;p=gcc.git system.h (TARGET_ESC): Move to ... * system.h (TARGET_ESC): Move to ... * defaults.h (TARGET_ESC): ... here. * target-def.h (TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Default to a no-op handler. * tree.c (default_valid_attribute_p): New. (valid_machine_attribute): Handlers can not be NULL. * tree.h (default_valid_attribute_p): New. * doc/tm.texi: Document TARGET_ESC. * cp/decl2.c (import_export_class): Update. From-SVN: r43615 --- diff --git a/gcc/target-def.h b/gcc/target-def.h index 1af66c38293..78fd30f6f23 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -20,13 +20,16 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. what you give them. Help stamp out software-hoarding! */ /* See target.h for a desciption of what this file contains and how to - use it. */ + use it. -/* Both in tree.c. */ + We want to have non-NULL default definitions of all hook functions, + even if they do nothing. */ + +/* All in tree.c. */ #define TARGET_MERGE_DECL_ATTRIBUTES merge_decl_attributes #define TARGET_MERGE_TYPE_ATTRIBUTES merge_type_attributes -#define TARGET_VALID_DECL_ATTRIBUTE 0 -#define TARGET_VALID_TYPE_ATTRIBUTE 0 +#define TARGET_VALID_DECL_ATTRIBUTE default_valid_attribute_p +#define TARGET_VALID_TYPE_ATTRIBUTE default_valid_attribute_p /* The whole shebang. */ #define TARGET_INITIALIZER \ diff --git a/gcc/target.h b/gcc/target.h index 08d0568573c..6e97ee7f21f 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -52,13 +52,13 @@ struct gcc_target /* Given two types, merge their attributes and return the result. */ tree (* merge_type_attributes) PARAMS ((tree, tree)); - /* Nonzero if IDENTIFIER with arguments ARGS is a valid machine + /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific attribute for DECL. The attributes in ATTRIBUTES have previously been assigned to DECL. */ int (* valid_decl_attribute) PARAMS ((tree decl, tree attributes, tree identifier, tree args)); - /* Nonzero if IDENTIFIER with arguments ARGS is a valid machine + /* Return nonzero if IDENTIFIER with arguments ARGS is a valid machine specific attribute for TYPE. The attributes in ATTRIBUTES have previously been assigned to TYPE. */ int (* valid_type_attribute) PARAMS ((tree type, tree attributes,