This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: -Wno-return-type doesn't seem to work.
- To: duz at rtsffm dot com
- Subject: Re: -Wno-return-type doesn't seem to work.
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 10 Aug 1999 21:49:23 +0200
- CC: gcc-bugs at gcc dot gnu dot org
- References: <199908101234.OAA38000@rtsffm.com>
> on Solaris I have the problem that gcc-2.95 generates enormous amounts
> of warning messages from sloppy Motif include files.
Thanks for your bug report. Your observations are all correct, and
most of your conclusions are as well.
> I understand that you end up in line (1) when pedantic or when the
> declared function is not main. I.e. any (flawed) function declaration
> with the exception of main triggers the pedwarn and line (2) is almost
> never reached. Therefore the test for warn_return_type does not help.
Exactly. However, this is intentional.
> The deeper problem on my Sun installation seems to be that it does not
> qualify the file named "/usr/openwin/share/include/X11/Intrinsic.h" as
> a system header. Obviously this worked on all your systems such that
> you did not notice the above described problem.
No. This is a well-known problem, please see
http://egcs.cygnus.com/faq.html#X11R6
The issue is that Sun keeps shipping X11 header file which do not
compile as C++ source, even though
a) they should know about the problem for years, and
b) replacement header files have been available from the X11
consortium for the same time
So, you should complain to your operating system vendor about not
conforming to international standards, instead of to your compiler
vendor for doing so.
Because this is such a familiar problem, g++ only emits a warning and
still accepts the code, as an extensions. In pedantic mode, you'll get
an error.
If you absolutely can't live with the warning: Well, you got the
source to both the compiler, and the X11 headers.
Regards,
Martin