This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/365
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/365
- From: Ken Herron <kherron at newsguy dot com>
- Date: 30 Jun 2000 16:06:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Ken Herron <kherron at newsguy dot com>
The following reply was made to PR c++/365; it has been noted by GNATS.
From: Ken Herron <kherron@newsguy.com>
To: loewis@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/365
Date: Fri, 30 Jun 2000 09:00:23 -0700
loewis@gcc.gnu.org wrote:
>
> Synopsis: Turn off 'ANSI C++ forbids declaration `%D' with no type' warnings
>
> State-Changed-From-To: open->closed
> State-Changed-By: loewis
> State-Changed-When: Fri Jun 30 00:11:01 2000
> State-Changed-Why:
> This is not a bug. The behaviour is by design, see
> http://gcc.gnu.org/cgi-bin/fom.cgi?file=25
> Please report this bug in the header files to your operating
> system vendor
>
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=365&database=gcc
The FAQ entry concerns g++ emitting errors. I have read the entry and was
aware of how to reduce the errors to warnings, as I indicated in the
original report. The FAQ does not document any desire by the GCC team to
make these warnings impossible to turn off.
The GCC manual describes this flag:
`-Wreturn-type'
Warn whenever a function is defined with a return-type that
defaults to `int'. Also warn about any `return' statement with no
return-value in a function whose return-type is not `void'.
yet, specifying `-Wno-return-type' does not turn off the warnings in
question, which are certainly about the kind of functions this warning
covers. Why is this not a bug?
I am in the position of supporting an open-source project which produces
over 150 warnings per file when compiled on Solaris, warnings that can't
be shut off. I hope Sun plans to fix their headers, but what if they
don't? What benefit are these warings to a developer who has done nothing
wrong or an end-user who just wants to use the program? Why not provide a
means to turn off the warnings?
--
Kenneth Herron -- kherron@newsguy.com
"Subversion has always been our best tactic...It leaves the competition
confused, and they don't know what to shoot at anymore."
-- John Ludwig, Vice president, Microsoft