diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-22 15:54:05 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-22 15:54:05 +0000 |
commit | 0d438110c521e5799218007ecec7f3e1cb919bb7 (patch) | |
tree | b213317c3f34e3c03d9cc572db411c63b2179ffe /gcc/doc | |
parent | d819917f8654510afb127bf5e8cfce701f8c930d (diff) | |
download | gcc-0d438110c521e5799218007ecec7f3e1cb919bb7.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 1c3c9dfba46..b65280bfce0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -222,7 +222,8 @@ Objective-C and Objective-C++ Dialects}. @xref{Warning Options,,Options to Request or Suppress Warnings}. @gccoptlist{-fsyntax-only -pedantic -pedantic-errors @gol -w -Wextra -Wall -Waggregate-return -Walways-true -Wno-attributes @gol --Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol +-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts @gol +-Wclobbered -Wcomment @gol -Wconversion -Wno-deprecated-declarations @gol -Wdisabled-optimization -Wno-div-by-zero @gol -Wempty-body -Wno-endif-labels @gol @@ -2925,6 +2926,7 @@ A pointer is compared against integer zero with @samp{<}, @samp{<=}, @item A variable might be changed by @samp{longjmp} or @samp{vfork}. +This warning can be independently controlled by @option{-Wclobbered}. @item Any of several floating-point events that often indicate errors, such as @@ -3157,6 +3159,11 @@ only if you have been very careful about using @code{const} in declarations and prototypes. Otherwise, it will just be a nuisance; this is why we did not make @option{-Wall} request these warnings. +@item -Wclobbered +@opindex Wclobbered +Warn for variables that might be changed by @samp{longjmp} or +@samp{vfork}. This warning is also enabled by @option{-Wextra}. + @item -Wconversion @opindex Wconversion Warn for implicit conversions that may alter a value. This includes |