This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 'extern "C" { ...}' and 'ANSI C++ forbids ...'
- To: kostab at math dot uni-muenster dot de
- Subject: Re: 'extern "C" { ...}' and 'ANSI C++ forbids ...'
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Thu, 15 Jul 1999 21:26:45 +0200
- CC: mal at bewoner dot dma dot be, egcs at egcs dot cygnus dot com
- References: <378DC6EF.B77D653D@math.uni-muenster.de> <19990715132532.6162.qmail@localhost.localdomain> <378DCD55.B053A795@math.uni-muenster.de> <19990715134449.6814.qmail@localhost.localdomain> <378DD25E.EF5AB88B@math.uni-muenster.de>
> But we are developing on multiple platforms, which would mean forcing every
> developer to do the same; which is not acceptable!
Don't complain about the compiler for implementing ISO standards (*);
complain to your operating system vendor for not implementing them.
The X11 header file is clearly not ISO C++; and it uses features of
ISO C that are deprecated in that standard. The fact that the header
is wrapped with 'extern "C"' still does not make it acceptable to a
C++ compiler.
g++ used to be very unrestrictive in the past. In X11, there was a
problem for about ten years; without complaints, vendors will continue
to ship broken header files, even though fixed ones are available from
the X consortium (**).
As others pointed out: This is a FAQ, and the answer is to use
-fpermissive.
Regards,
Martin
(*) Or, if compliance to standards is a problem for you, don't use
compilers that implement standards.
(**) I don't know whether upgrading to Solaris 7 would help; I hope it
would.