summaryrefslogtreecommitdiff
path: root/gcc/invoke.texi
diff options
context:
space:
mode:
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-30 16:47:15 +0000
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-30 16:47:15 +0000
commit3359b21c9c5f89382337d0dd82e6d01788fd0632 (patch)
treef8b22fdb9de1dcbf35c1c418f78a1d563ea89b6c /gcc/invoke.texi
parentb086b37b4b999ac37b51772ea9e60d8c6d0d366a (diff)
downloadgcc-3359b21c9c5f89382337d0dd82e6d01788fd0632.tar.gz
* invoke.texi (-Wreturn-type): In C++, a missing return type is
always an error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34813 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/invoke.texi')
-rw-r--r--gcc/invoke.texi10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index 07663448263..21d16d2f354 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -1553,9 +1553,13 @@ the enclosing @code{if}. The resulting code would look like this:
@end smallexample
@item -Wreturn-type
-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}.
+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++, a function without return type always produces a diagnostic
+message, even when @samp{-Wno-return-type} is specified. The only
+exceptions are @samp{main} and functions defined in system headers.
@item -Wswitch
Warn whenever a @code{switch} statement has an index of enumeral type