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: Konstantin Baumann <kostab at ESCHER dot UNI-MUENSTER dot DE>
- Subject: Re: 'extern "C" { ...}' and 'ANSI C++ forbids ...'
- From: Branko Cibej <branko dot cibej at hermes dot si>
- Date: Thu, 15 Jul 1999 14:46:49 +0200
- CC: mal at bewoner dot dma dot be, egcs at egcs dot cygnus dot com
- Organization: HERMES SoftLab
- 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>
Konstantin Baumann wrote:
> mal@bewoner.dma.be wrote:
>
> > > > > I think this an error, because the <X11/Xlib.h>-header-file is included in
> > > > > "C"-mode not in "C++"-mode!
> > > > >
> > > >
> > > > No. extern "C" just influences the linkage. The included stuff must be
> > > > correct C++. just add int at the right place.
> > >
> > > But the included files are standard-system-header-files (e.g. for X11) I am not
> > > allowed to change!
> >
> > Make a copy and make sure that gets found before the system header
> > file.
>
> That would work for ME.
> But we are developing on multiple platforms, which would mean forcing every
> developer to do the same; which is not acceptable!
Use -fpermissive. This is a FAQ: http://egcs.cygnus.com/faq.html#X11R6
--
Branko Čibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 61) 186 53 49 fax: (+386 61) 186 52 70