diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-21 05:31:45 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-08-21 05:31:45 +0000 |
commit | df018bb261c2da3c671f93410f43f5917ea1ee4a (patch) | |
tree | aa04f3782cdbc7d991c92df1ea79fe631f770d80 /gcc | |
parent | 370ea236836b1f8d1034e8b1298b3a927aeb663a (diff) | |
download | gcc-df018bb261c2da3c671f93410f43f5917ea1ee4a.tar.gz |
The 'xxx may be clobbered by longjmp/vfork' warnings are part of
by -Wuninitialized.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28787 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/invoke.texi | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gcc/invoke.texi b/gcc/invoke.texi index 7dadd3f8db9..52c6c19c06c 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -1532,6 +1532,16 @@ another common case: @noindent This has no bug because @code{save_y} is used only if it is set. +@cindex @code{longjmp} warnings +This option also warns when a nonvolatile automatic variable might be +changed by a call to @code{longjmp}. + +The compiler sees only the calls to @code{setjmp}. It cannot know +where @code{longjmp} will be called; in fact, a signal handler could +call it at any point in the code. As a result, you may get a warning +even when there is in fact no problem because @code{longjmp} cannot +in fact be called at the place which would cause a problem. + Some spurious warnings can be avoided if you declare all the functions you use that never return as @code{noreturn}. @xref{Function Attributes}. @@ -1564,18 +1574,6 @@ the warning. Print extra warning messages for these events: @itemize @bullet -@cindex @code{longjmp} warnings -@item -A nonvolatile automatic variable might be changed by a call to -@code{longjmp}. These warnings as well are possible only in -optimizing compilation. - -The compiler sees only the calls to @code{setjmp}. It cannot know -where @code{longjmp} will be called; in fact, a signal handler could -call it at any point in the code. As a result, you may get a warning -even when there is in fact no problem because @code{longjmp} cannot -in fact be called at the place which would cause a problem. - @item A function can return either with or without a value. (Falling off the end of the function body is considered returning without |