diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-19 20:29:01 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-19 20:29:01 +0000 |
commit | 0cb502930fc1b511dd1acab155ef5b0291d7edef (patch) | |
tree | ad286296a88a627c032b917d2d413f56d8875840 /gcc/c-lang.c | |
parent | ac9b19aaa4d30842172a28c02ee38ec006d56e56 (diff) | |
download | gcc-0cb502930fc1b511dd1acab155ef5b0291d7edef.tar.gz |
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
Diffstat (limited to 'gcc/c-lang.c')
-rw-r--r-- | gcc/c-lang.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |