diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-20 07:32:08 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-10-20 07:32:08 +0000 |
commit | 8d3eb46efe13fc33b60e4657da64a32f1515ca37 (patch) | |
tree | 3a1a6a1311b867a1768dacc4273f79b79d375b1f /gcc/invoke.texi | |
parent | 96f4780becade6947669d6287c8b228d2dedd4d4 (diff) | |
download | gcc-8d3eb46efe13fc33b60e4657da64a32f1515ca37.tar.gz |
New warning, `missing-noreturn':
* c-decl.c (warn_missing_noreturn): New global variable.
(c_decode_option): Check for new flags -W{no-}missing-noreturn.
(finish_function): Implement missing noreturn warning.
* c-tree.h (warn_missing_noreturn): Declare extern.
* invoke.texi: Document new flags.
* toplev.c (documented_lang_options): Add description.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/invoke.texi')
-rw-r--r-- | gcc/invoke.texi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/invoke.texi b/gcc/invoke.texi index cf461987208..f6ecd648ca7 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -123,7 +123,7 @@ in the following sections. -Wimplicit-function-declaration -Wimport -Werror-implicit-function-declaration -Winline -Wlarger-than-@var{len} -Wlong-long --Wmain -Wmissing-declarations +-Wmain -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes -Wmultichar -Wnested-externs -Wno-import -Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder @@ -1617,6 +1617,13 @@ Do so even if the definition itself provides a prototype. Use this option to detect global functions that are not declared in header files. +@item -Wmissing-noreturn +Warn about functions which might be candidates for attribute @code{noreturn}. +Note these are only possible candidates, not absolute ones. Care should +be taken to manually verify functions actually do not ever return before +adding the @code{noreturn} attribute, otherwise subtle code generation +bugs could be introduced. + @item -Wredundant-decls Warn if anything is declared more than once in the same scope, even in cases where multiple declaration is valid and changes nothing. |