From: mueller Date: Tue, 30 Jan 2007 16:20:06 +0000 (+0000) Subject: 2007-01-30 Dirk Mueller X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca0cc11fdc2790a244192e492b3b4b8293bc58fc;p=thirdparty%2Fgcc.git 2007-01-30 Dirk Mueller PR c++/30601 * doc/invoke.texi (-Wreturn-type): Update description to match new behavior. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121342 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa3cf11d4ca1..1f712d064fe9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-01-30 Dirk Mueller + + PR c++/30601 + * doc/invoke.texi (-Wreturn-type): Update description to + match new behavior. + 2007-01-30 Richard Sandiford * cfgrtl.c (try_redirect_by_replacing_jump): Check only_sets_cc0_p. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index eb55c9b321a5..bd4bca6c9b44 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -2657,11 +2657,13 @@ Warn whenever a function is defined with a return-type that defaults to @code{int}. Also warn about any @code{return} statement with no return-value in a function whose return-type is not @code{void}. -For C, also warn if the return type of a function has a type qualifier -such as @code{const}. Such a type qualifier has no effect, since the -value returned by a function is not an lvalue. ISO C prohibits -qualified @code{void} return types on function definitions, so such -return types always receive a warning even without this option. +Also warn if the return type of a function has a type qualifier +such as @code{const}. For ISO C such a type qualifier has no effect, +since the value returned by a function is not an lvalue. +For C++, the warning is only emitted for scalar types or @code{void}. +ISO C prohibits qualified @code{void} return types on function +definitions, so such return types always receive a warning +even without this option. For C++, a function without return type always produces a diagnostic message, even when @option{-Wno-return-type} is specified. The only