This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

-Wreturn-tpye pagches


I just committed the patch below.

Martin

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.


Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/invoke.texi,v
retrieving revision 1.197
diff -u -r1.197 invoke.texi
--- invoke.texi	2000/06/21 17:10:00	1.197
+++ invoke.texi	2000/06/30 16:33:03
@@ -1553,9 +1553,13 @@
 @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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]