aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>2000-06-30 16:47:15 +0000
committerMartin v. Löwis <loewis@gcc.gnu.org>2000-06-30 16:47:15 +0000
commit32c4c36c297d245b255c54aff2da9027df6093ed (patch)
treef8b22fdb9de1dcbf35c1c418f78a1d563ea89b6c /gcc
parent996b539fa3737f90bc0bc7fe15f75f6fcdf9c5b9 (diff)
downloadgcc-32c4c36c297d245b255c54aff2da9027df6093ed.zip
gcc-32c4c36c297d245b255c54aff2da9027df6093ed.tar.gz
gcc-32c4c36c297d245b255c54aff2da9027df6093ed.tar.bz2
invoke.texi (-Wreturn-type): In C++, a missing return type is always an error.
* invoke.texi (-Wreturn-type): In C++, a missing return type is always an error. From-SVN: r34813
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/invoke.texi10
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4901baf..e32ef9f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-30 Martin von Loewis <loewis@informatik.hu-berlin.de>
+
+ * invoke.texi (-Wreturn-type): In C++, a missing return type is
+ always an error.
+
2000-06-30 Catherine Moore <clm@cygnus.com>
* c-common.c (decl_attributes): Differentiate between
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index 0766344..21d16d2 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