This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/30601: Update documentation
- From: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- To: Dirk Mueller <dmueller at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 29 Jan 2007 18:44:24 -0600
- Subject: Re: [PATCH] PR c++/30601: Update documentation
- References: <200701292311.49894.dmueller@suse.de>
Dirk Mueller <dmueller@suse.de> writes:
| Hi,
|
| PR 30601 points out a documentation defect, my previous patch which improved
| the -Wreturn-type warning for C++ did not properly update the documentation.
|
| I'm not 100% if this is pre-approved, therefore I'm posting it for review.
| bootstrapped on i686-suse-linux.
|
| 2007-01-29 Dirk Mueller <dmueller@suse.de>
|
| PR c++/30601
| * doc/invoke.texi (-Wreturn-type): Update description to
| match new behavior.
|
| --- invoke.texi (revision 121080)
| +++ invoke.texi (working copy)
| @@ -2643,11 +2643,13 @@ Warn whenever a function is defined with
| @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.
This seems OK for me.
-- Gaby