Commit 8fbe1035 by Marc Lehmann Committed by Marc Lehmann

toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber warning from…

toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber warning from -Wuninitialized and put it under -W.

Sun Oct 31 13:32:15 CET 1999  Marc Lehmann <pcg@goof.com>

	* toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber
        warning from -Wuninitialized and put it under -W.
        * function.c (uninitialized_vars_warning): Warn only when the
        corresponding flag is set.

From-SVN: r30294
parent 79f5f47f
Sun Oct 31 13:32:15 CET 1999 Marc Lehmann <pcg@goof.com>
* toplev.c (rest_of_compilation): Seperate the setjmp/vfork clobber
warning from -Wuninitialized and put it under -W.
* function.c (uninitialized_vars_warning): Warn only when the
corresponding flag is set.
Sun Oct 31 01:53:30 1999 Jeffrey A Law (law@cygnus.com) Sun Oct 31 01:53:30 1999 Jeffrey A Law (law@cygnus.com)
* combine.c (combine_simplify_rtx): Renamed from simplify_rtx. All * combine.c (combine_simplify_rtx): Renamed from simplify_rtx. All
......
...@@ -5075,7 +5075,8 @@ uninitialized_vars_warning (block) ...@@ -5075,7 +5075,8 @@ uninitialized_vars_warning (block)
register tree decl, sub; register tree decl, sub;
for (decl = BLOCK_VARS (block); decl; decl = TREE_CHAIN (decl)) for (decl = BLOCK_VARS (block); decl; decl = TREE_CHAIN (decl))
{ {
if (TREE_CODE (decl) == VAR_DECL if (warn_uninitialized
&& TREE_CODE (decl) == VAR_DECL
/* These warnings are unreliable for and aggregates /* These warnings are unreliable for and aggregates
because assigning the fields one by one can fail to convince because assigning the fields one by one can fail to convince
flow.c that the entire aggregate was initialized. flow.c that the entire aggregate was initialized.
...@@ -5094,7 +5095,8 @@ uninitialized_vars_warning (block) ...@@ -5094,7 +5095,8 @@ uninitialized_vars_warning (block)
&& regno_uninitialized (REGNO (DECL_RTL (decl)))) && regno_uninitialized (REGNO (DECL_RTL (decl))))
warning_with_decl (decl, warning_with_decl (decl,
"`%s' might be used uninitialized in this function"); "`%s' might be used uninitialized in this function");
if (TREE_CODE (decl) == VAR_DECL if (extra_warnings
&& TREE_CODE (decl) == VAR_DECL
&& DECL_RTL (decl) != 0 && DECL_RTL (decl) != 0
&& GET_CODE (DECL_RTL (decl)) == REG && GET_CODE (DECL_RTL (decl)) == REG
&& regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl)))) && regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))
......
...@@ -4010,10 +4010,11 @@ rest_of_compilation (decl) ...@@ -4010,10 +4010,11 @@ rest_of_compilation (decl)
life_analysis (insns, max_reg_num (), rtl_dump_file, 1); life_analysis (insns, max_reg_num (), rtl_dump_file, 1);
}); });
if (warn_uninitialized) if (warn_uninitialized || extra_warnings)
{ {
uninitialized_vars_warning (DECL_INITIAL (decl)); uninitialized_vars_warning (DECL_INITIAL (decl));
setjmp_args_warning (); if (extra_warnings)
setjmp_args_warning ();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment