aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorMarc Lehmann <pcg@goof.com>1999-10-31 21:52:00 +0000
committerMarc Lehmann <pcg@gcc.gnu.org>1999-10-31 21:52:00 +0000
commit8fbe10354e67f3e1e6de42a770c3247c6f3b9330 (patch)
treea7db00102c8e77be3ca6732e8ed7aac1339905d7 /gcc/function.c
parent79f5f47f761945b6d6af8cd5bbdd3956f2336ecc (diff)
downloadgcc-8fbe10354e67f3e1e6de42a770c3247c6f3b9330.zip
gcc-8fbe10354e67f3e1e6de42a770c3247c6f3b9330.tar.gz
gcc-8fbe10354e67f3e1e6de42a770c3247c6f3b9330.tar.bz2
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
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index f6f5d88..10a33da 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5075,7 +5075,8 @@ uninitialized_vars_warning (block)
register tree decl, sub;
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
because assigning the fields one by one can fail to convince
flow.c that the entire aggregate was initialized.
@@ -5094,7 +5095,8 @@ uninitialized_vars_warning (block)
&& regno_uninitialized (REGNO (DECL_RTL (decl))))
warning_with_decl (decl,
"`%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
&& GET_CODE (DECL_RTL (decl)) == REG
&& regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl))))