This is the mail archive of the gcc@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: 'extern "C" { ...}' and 'ANSI C++ forbids ...'


> 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.


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