From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFC] Require extern modifier for function prototypes in headers.
Date: Wed, 19 Dec 2012 11:25:00 -0000 [thread overview]
Message-ID: <000001cddddb$7999a0a0$6ccce1e0$@muller@ics-cnrs.unistra.fr> (raw)
Following the discussion triggered by my latest
RFA/OBVIOUS? email,
Joel proposed that I added a change to GDB coding styles.
Here it is.
Currently you can use "extern" modifier or leave it out.
Apparently it should make no difference for function prototypes,
but I still find it strange to have all functions but one
being declared with "extern", like in ui-file.h header.
Comments mowt welcome,
Pierre Muller
GDB pascal language maintainer
2012-12-19 Pierre Muller <muller@sourceware.org>
* gdbint.texinfo (Function prototypes): Require use of "extern"
modifier for function prototypes in headers.
Index: gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.344
diff -u -r1.344 gdbint.texinfo
--- gdbint.texinfo 16 Dec 2012 19:00:04 -0000 1.344
+++ gdbint.texinfo 19 Dec 2012 11:19:40 -0000
@@ -5935,7 +5935,8 @@
function definition.
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.
next prev reply other threads:[~2012-12-19 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <000001cddddb$7999a0a0$6ccce1e0$%muller@ics-cnrs.unistra.fr>
2012-12-19 16:58 ` Eli Zaretskii
2012-12-19 21:48 ` Pierre Muller
2012-12-19 11:25 ` Pierre Muller [this message]
2012-12-22 12:54 ` Jan Kratochvil
2012-12-22 17:53 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001cddddb$7999a0a0$6ccce1e0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox