From 0cb502930fc1b511dd1acab155ef5b0291d7edef Mon Sep 17 00:00:00 2001 From: pinskia Date: Tue, 19 Aug 2003 20:29:01 +0000 Subject: PR c++/10538, PR c/5582 ChangeLog: * langhooks-def.h (lhd_decl_uninit): Declare. (LANG_HOOKS_DECL_UNINIT): New macro. (LANG_HOOKS_INITIALIZER): Adjust. * langhooks.h (struct lang_hooks): Add new field decl_uninit. * langhooks.c (lhd_decl_uninit): Define. * c-common.c (c_decl_uninit_1): New function. (c_decl_uninit): New function. (warn_init_self): Define. * c-common.h (c_decl_uninit): Declare. (warn_init_self): Declare. * c.opt: Introduce -Winit-self. * c-opts.c (c_common_handle_options): Set warn_init_self. * c-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Define. * function.c (uninitialized_vars_warning): Call the language hook. * doc/invoke.texi: Document -Winit-self. cp/ChangeLog: * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define. testsuite: * gcc.dg/uninit-D.c: New Test. * gcc.dg/uninit-E.c: New Test. * gcc.dg/uninit-F.c: New Test. * gcc.dg/uninit-G.c: New Test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70574 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 fce866266fc..f8ab4165f4e 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -87,6 +87,8 @@ enum c_language_kind c_language = clk_c; #define LANG_HOOKS_FUNCTION_LEAVE_NESTED c_pop_function_context #undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL #define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL c_dup_lang_specific_decl +#undef LANG_HOOKS_DECL_UNINIT +#define LANG_HOOKS_DECL_UNINIT c_decl_uninit /* Attribute hooks. */ #undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE -- cgit v1.2.1