From: Shawn Pearce <spearce@spearce.org>
To: Olivier Galibert <galibert@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Avoid C++ comments, use C comments instead
Date: Mon, 10 Jul 2006 20:15:05 -0400 [thread overview]
Message-ID: <20060711001504.GA10700@spearce.org> (raw)
In-Reply-To: <20060710235122.GB26528@dspnet.fr.eu.org>
Olivier Galibert <galibert@pobox.com> wrote:
> On Tue, Jul 11, 2006 at 02:25:44AM +0300, Yakov Lerner wrote:
> > I am writing in order to ask, whether there maybe
> > some c99-to-c89 source convertor that can be
> > automatically applied to the .c before compiling with
> > pre-c99 compiler ?
>
> Comments are easy. Moving declarations without breaking initializers
> is harder. Rewriting the struct initializers is pretty much
> impossible without the tool turning into a full-blown C parser.
>
> Maybe git can be perfectly happy with c89. I don't know. I know the
> linux kernel requires c99, mostly for the struct initializers. My
> point was that staying at the c89 level has a maintainance cost, and a
> cost/benefit analysis should be done to decide whether it is a good
> idea. Answering "get a C compiler", as is being done for some years
> now for people not wanting prototypes, is an option not to neglect.
GIT 1.2.3 had a lot more struct initializers than GIT 1.4.1 has. So
apparently it was cleaner to remove a few of them in some cases then
it was to keep them in. But that's besides the point.
I can understand the core maintainers not wanting to apply my patch
and lose the benefits of c99, and if I have to I'll carry a private
branch with that patch and hand-edit future versions as necessary
to get the same result... but I'd hate to see another user have
to do the same work for the same reason.
I'm not a big contributor to GIT (I certainly don't contribute
nearly as much code as most others) and I'm also not a big user of
GIT (I don't develop for the Linux kernel) so I not expecting the
core to drop to c89 just for me and this old compiler. :-)
After reading this thread I'm thinking that this probably shouldn't
get merged in and that I should carry the tweaks locally to get
GIT to build on the only compiler I have available on that system.
Now that GIT 1.4.1 is installed on there I'm unlikely to upgrade it
for at least 6 months, as I'm using only the very low level plumbing
(git-read-tree, git-write-tree, git-update-index, git-repack).
Remerging these c99 downgrades at that time shouldn't be a huge
issue for me since its probably going to be done so infrequently.
--
Shawn.
next prev parent reply other threads:[~2006-07-11 0:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 6:57 [PATCH] Avoid C++ comments, use C comments instead Pavel Roskin
2006-07-10 7:46 ` Junio C Hamano
2006-07-10 9:46 ` Olivier Galibert
2006-07-10 11:06 ` Johannes Schindelin
2006-07-10 11:41 ` Olivier Galibert
2006-07-10 19:14 ` Paul Serice
2006-07-10 20:24 ` Olivier Galibert
2006-07-10 22:55 ` Johannes Schindelin
2006-07-10 23:25 ` Yakov Lerner
2006-07-10 23:51 ` Olivier Galibert
2006-07-11 0:15 ` Shawn Pearce [this message]
2006-07-11 0:34 ` Junio C Hamano
2006-07-10 23:42 ` Olivier Galibert
2006-07-11 5:17 ` Pavel Roskin
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=20060711001504.GA10700@spearce.org \
--to=spearce@spearce.org \
--cc=galibert@pobox.com \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.