From 8d58a5a7900f5543f186d868d265d75be0f09cdc Mon Sep 17 00:00:00 2001 From: rth Date: Wed, 3 Apr 2002 22:39:51 +0000 Subject: PR opt/4330 * langhooks.h (lang_hooks.decls.warn_unused_global): New. * toplev.c (check_global_declarations): Use it. * langhooks-def.h (lhd_warn_unused_global_decl): Declare. (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. (LANG_HOOKS_DECLS): Add it. * langhooks.c (lhd_warn_unused_global_decl): New. * c-decl.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * c-objc-common.c (c_warn_unused_global_decl): New. * c-tree.h (c_warn_unused_global_decl): Declare. * objc/objc-lang.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * cp-lang.c (cxx_warn_unused_global_decl): New. (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New. * g++.dg/warn/Wunused-2.C: New. * gcc.dg/unused-4.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51818 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-lang.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/c-lang.c') diff --git a/gcc/c-lang.c b/gcc/c-lang.c index 278a252bffd..f11dce4a892 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -66,6 +66,8 @@ static void c_post_options PARAMS ((void)); #define LANG_HOOKS_UNSAFE_FOR_REEVAL c_common_unsafe_for_reeval #undef LANG_HOOKS_STATICP #define LANG_HOOKS_STATICP c_staticp +#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL +#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL c_warn_unused_global_decl #undef LANG_HOOKS_PRINT_IDENTIFIER #define LANG_HOOKS_PRINT_IDENTIFIER c_print_identifier #undef LANG_HOOKS_SET_YYDEBUG -- cgit v1.2.3