From: Andrew Cagney <ac131313@cygnus.com>
To: Alan Modra <amodra@bigpond.net.au>
Cc: Kazu Hirata <kazu@hxi.com>,
binutils@sources.redhat.com, Eli Zaretskii <eliz@is.elta.co.il>
Subject: Re: [patch] *-dis.c: Fix formatting.
Date: Sat, 18 Aug 2001 10:08:00 -0000 [thread overview]
Message-ID: <3B7EA0FF.6010601@cygnus.com> (raw)
In-Reply-To: <20010818145846.E31523@bubble.sa.bigpond.net.au>
>
> Oh?
>
> http://www.gnu.org/prep/standards_23.html#SEC24
>
> "It is important to put the open-brace that starts the body of a C
> function in column zero, and avoid putting any other open-brace or
> open-parenthesis or open-bracket in column zero. Several tools look
> for open-braces in column zero to find the beginnings of C functions.
> These tools will not work on code not formatted that way."
Ah, we've got a pan-pacific manual throwing competition on our hands :-)
From the same manual:
> The rest of this section gives our recommendations for other aspects of C formatting style, which is also the default style of the indent program in version 1.2 and newer. It corresponds to the options
>
> -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
> -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
These are also the flags you get by default when running GNU indent -
you shouldn't be overriding these flags.
Anyway, there is an apparent contradiction. Consulting the reference
implementation (emacs) I can see:
struct foo
{
int arg;
long sigh;
double arg;
};
(Which an old version of indent was generating) and:
struct bar
{
int eresting;
int egers;
};
which GNU indent 2.2.6 is generating and clearly documents. There is
also the very very occasional:
struct baz {
int erface;
};
(20 vs 260 from a mindless grep).
I would work on the assumption that one of the first two is correct. A
brace sharing a line with other junk doesn't exactly look GNU :-)
Andrew
next prev parent reply other threads:[~2001-08-18 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200108171934.MAA23915@cygnus.com>
2001-08-17 21:34 ` Andrew Cagney
2001-08-17 22:28 ` Alan Modra
2001-08-18 10:08 ` Andrew Cagney
2001-08-18 10:08 ` Andrew Cagney [this message]
2001-08-19 6:33 ` Alan Modra
2001-08-21 19:58 ` Andrew Cagney
2001-08-17 12:33 Kazu Hirata
[not found] <200108121542.IAA18490@cygnus.com>
2001-08-13 1:05 ` Nick Clifton
-- strict thread matches above, loose matches on Subject: below --
2001-08-12 8:42 Kazu Hirata
[not found] <no.id>
2001-07-23 17:10 ` Alan Modra
2001-07-23 7:53 Kazu Hirata
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=3B7EA0FF.6010601@cygnus.com \
--to=ac131313@cygnus.com \
--cc=amodra@bigpond.net.au \
--cc=binutils@sources.redhat.com \
--cc=eliz@is.elta.co.il \
--cc=kazu@hxi.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).