This is the mail archive of the gcc-prs@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]

Re: c++/365


The following reply was made to PR c++/365; it has been noted by GNATS.

From: Martin von Loewis <loewis@informatik.hu-berlin.de>
To: kherron@newsguy.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/365
Date: Fri, 30 Jun 2000 18:38:42 +0200 (MET DST)

 > Why is this not a bug?
 
 It actually is a bug in the documentation. I'm going to add the
 following patch to invoke.texi
 
 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
 
 
 > Why not provide a means to turn off the warnings?
 
 There are already at least three means to turn the warnings off: you
 can fix the header files in your Solaris installation yourself, or you
 can declare the openwin directory as a system include directory, or
 you can change the compiler in any way you want - since you have the
 source code to the compiler.
 
 Regards,
 Martin

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