diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2006-12-22 15:54:05 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2006-12-22 15:54:05 +0000 |
commit | 2b0017242d6888e91146422831551f64e9854698 (patch) | |
tree | b213317c3f34e3c03d9cc572db411c63b2179ffe /gcc/function.c | |
parent | 24fc18b98c30f23c5de5bce0fb6b90f5929fe453 (diff) | |
download | gcc-2b0017242d6888e91146422831551f64e9854698.zip gcc-2b0017242d6888e91146422831551f64e9854698.tar.gz gcc-2b0017242d6888e91146422831551f64e9854698.tar.bz2 |
re PR middle-end/7651 (Define -Wextra strictly in terms of other warning flags)
2006-12-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
* c.opt (Wclobbered): New.
* doc/invoke.texi (Wclobbered): Document it.
(Wextra): Enabled by -Wextra.
* c-opts.c (c_common_post_options): Enabled by -Wextra.
* flow.c (rest_of_handle_life): Replace Wextra with Wclobbered.
* function.c (setjmp_vars_warning): Only warn for Wclobbered.
(setjmp_args_warning): Likewise.
testsuite/
* gcc.dg/attr-returns_twice-1.c: Replace Wextra with Wclobbered.
* gcc.dg/setjmp-1.c: Add explicit Wclobbered.
From-SVN: r120151
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/function.c b/gcc/function.c index b61b900..581c083 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -3536,9 +3536,8 @@ setjmp_vars_warning (tree block) && DECL_RTL_SET_P (decl) && REG_P (DECL_RTL (decl)) && regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl)))) - warning (0, "variable %q+D might be clobbered by %<longjmp%>" - " or %<vfork%>", - decl); + warning (OPT_Wclobbered, "variable %q+D might be clobbered by" + " %<longjmp%> or %<vfork%>", decl); } for (sub = BLOCK_SUBBLOCKS (block); sub; sub = TREE_CHAIN (sub)) @@ -3557,7 +3556,8 @@ setjmp_args_warning (void) if (DECL_RTL (decl) != 0 && REG_P (DECL_RTL (decl)) && regno_clobbered_at_setjmp (REGNO (DECL_RTL (decl)))) - warning (0, "argument %q+D might be clobbered by %<longjmp%> or %<vfork%>", + warning (OPT_Wclobbered, + "argument %q+D might be clobbered by %<longjmp%> or %<vfork%>", decl); } |