From 03aa99d49fc01b8416a5bec9cbf839da9b7962c8 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 4 Aug 2003 20:44:20 +0000 Subject: c-common.c (flag_noniso_default_format_attributes): Delete. * c-common.c (flag_noniso_default_format_attributes): Delete. (built_in_attribute): Don't define/undefine DEF_FN_ATTR. (c_attrs_initialized): Delete. (c_common_nodes_and_builtins): Don't test c_attrs_initialized, always call c_init_attributes. (c_init_attributes): Don't define/undefine DEF_FN_ATTR. Don't set c_attrs_initialized when done. (c_common_insert_default_attributes): Delete. * c-common.h (flag_noniso_default_format_attributes): Delete. (c_coomon_insert_default_attributes): Delete prototype. * c-opts.c (set_std_c89, set_std_c99, set_std_cxx98): Dont set flag_noniso_default_format_attributes. * c-decl.c (c_insert_default_attributes): Delete. * c-tree.h (c_insert_default_attributes): Delete prototype. * attribs.c (decl_attributes): Don't call insert_default_attributes langhook. Update function description comment. * langhooks.h (lang_hooks): Remove insert_default_attributes field. * langhooks-def.h (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Delete. * c-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. * system.h: Poison LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES macro. cp/ * decl.c (cxx_insert_default_attributes): Delete. * cp-tree.h (cxx_insert_default_attributes): Don't prototype. * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. objc/ * objc-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define. From-SVN: r70155 --- gcc/c-common.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'gcc/c-common.c') diff --git a/gcc/c-common.c b/gcc/c-common.c index 5dc87d7..60e980f 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -372,11 +372,6 @@ int flag_isoc99; int flag_hosted = 1; -/* Nonzero means add default format_arg attributes for functions not - in ISO C. */ - -int flag_noniso_default_format_attributes = 1; - /* Nonzero means warn when casting a function call to a type that does not match the return type (e.g. (float)sqrt() or (anything*)malloc() when there is no previous declaration of sqrt or malloc. */ @@ -2957,20 +2952,16 @@ enum built_in_attribute #define DEF_ATTR_INT(ENUM, VALUE) ENUM, #define DEF_ATTR_IDENT(ENUM, STRING) ENUM, #define DEF_ATTR_TREE_LIST(ENUM, PURPOSE, VALUE, CHAIN) ENUM, -#define DEF_FN_ATTR(NAME, ATTRS, PREDICATE) /* No entry needed in enum. */ #include "builtin-attrs.def" #undef DEF_ATTR_NULL_TREE #undef DEF_ATTR_INT #undef DEF_ATTR_IDENT #undef DEF_ATTR_TREE_LIST -#undef DEF_FN_ATTR ATTR_LAST }; static GTY(()) tree built_in_attributes[(int) ATTR_LAST]; -static bool c_attrs_initialized = false; - static void c_init_attributes (void); /* Build tree nodes and builtin functions common to both C and C++ language @@ -3348,8 +3339,7 @@ c_common_nodes_and_builtins (void) #undef DEF_FUNCTION_TYPE_VAR_3 #undef DEF_POINTER_TYPE - if (!c_attrs_initialized) - c_init_attributes (); + c_init_attributes (); #define DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, \ BOTH_P, FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT) \ @@ -4176,21 +4166,11 @@ c_init_attributes (void) = tree_cons (built_in_attributes[(int) PURPOSE], \ built_in_attributes[(int) VALUE], \ built_in_attributes[(int) CHAIN]); -#define DEF_FN_ATTR(NAME, ATTRS, PREDICATE) /* No initialization needed. */ #include "builtin-attrs.def" #undef DEF_ATTR_NULL_TREE #undef DEF_ATTR_INT #undef DEF_ATTR_IDENT #undef DEF_ATTR_TREE_LIST -#undef DEF_FN_ATTR - c_attrs_initialized = true; -} - -/* Depending on the name of DECL, apply default attributes to it. */ - -void -c_common_insert_default_attributes (tree decl ATTRIBUTE_UNUSED) -{ } /* Output a -Wshadow warning MSGCODE about NAME, and give the location -- cgit v1.1