Commit 32c4c36c by Martin v. Löwis Committed by Martin v. Löwis

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
parent 996b539f
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> 2000-06-30 Catherine Moore <clm@cygnus.com>
* c-common.c (decl_attributes): Differentiate between * c-common.c (decl_attributes): Differentiate between
......
...@@ -1553,9 +1553,13 @@ the enclosing @code{if}. The resulting code would look like this: ...@@ -1553,9 +1553,13 @@ the enclosing @code{if}. The resulting code would look like this:
@end smallexample @end smallexample
@item -Wreturn-type @item -Wreturn-type
Warn whenever a function is defined with a return-type that defaults Warn whenever a function is defined with a return-type that defaults to
to @code{int}. Also warn about any @code{return} statement with no @code{int}. Also warn about any @code{return} statement with no
return-value in a function whose return-type is not @code{void}. 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 @item -Wswitch
Warn whenever a @code{switch} statement has an index of enumeral type Warn whenever a @code{switch} statement has an index of enumeral type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment