This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: () in C++ (was Re: [PATCH] C and C++ ICEs)
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: () in C++ (was Re: [PATCH] C and C++ ICEs)
- From: Horst von Brand <vonbrand at inf dot utfsm dot cl>
- Date: Tue, 20 Jun 2000 10:25:35 -0400
- cc: Nathan Sidwell <nathan at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
Jason Merrill <jason@cygnus.com> said:
> >>>>> Nathan Sidwell <nathan@codesourcery.com> writes:
> > So, Jason, what is your opinion about always treating
> > extern "C" void foo ();
> > extern "C" void (*ptr) ();
> > as
> > extern "C" void foo (void);
> > extern "C" void (*ptr) (void);
> > ?
> I'm opposed to it. That feature is there to deal with C library headers
> that have not been updated to include proper prototypes, such as the X
> library headers on some systems.
The only thing extern "foo" specifies in C++ is linkage. The function and
data declarations themselves must be C++. If you want K&R C syntax, do it
with an __extension__ perhaps?
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513