This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Require extern modifier for function prototypes in headers.
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 19 Dec 2012 18:58:24 +0200
- Subject: Re: [RFC] Require extern modifier for function prototypes in headers.
- References: <000001cddddb$7999a0a0$6ccce1e0$%muller@ics-cnrs.unistra.fr>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> 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.
Otherwise, OK with me.
Thanks.