RE: [RFC] Require extern modifier for function prototypes in headers.

Pierre Muller
2012-12-19T21:48:26Z

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : mercredi 19 décembre 2012 17:58
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFC] Require extern modifier for function prototypes in
> headers.
>
> > From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > Date: Wed, 19 Dec 2012 12:24:56 +0100
> >
> > All external functions should have a declaration in a header file that
> > -callers include, except for @code{_initialize_*} functions, which must
> > +callers include, that declaration should use the @code{extern}
modifier.
> > +The only exception concerns @code{_initialize_*} functions, which must
> > be external so that @file{init.c} construction works, but shouldn't be
> > visible to random source files.
>
> If all declarations must be external, the _initialize_* case is no
> longer special, so the second sentence should go away, IMO.

I thought that it was still special in the sense that they
are the only non-static functions that are not declared in headers,
but only inside the C source itself.

> Otherwise, OK with me.
>
> Thanks.

Pierre