From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: tromey@redhat.com
Cc: gdb@sourceware.org
Subject: Re: C99
Date: Tue, 16 Jul 2013 21:23:00 -0000 [thread overview]
Message-ID: <201307162122.r6GLMlMx012078@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <87wqoqi5yf.fsf@fleche.redhat.com> (message from Tom Tromey on Tue, 16 Jul 2013 14:51:36 -0600)
> From: Tom Tromey <tromey@redhat.com>
> Date: Tue, 16 Jul 2013 14:51:36 -0600
>
> I'd like to draw attention to this patch:
>
> http://sourceware.org/ml/gdb-patches/2013-06/msg00808.html
>
> This points out that gdb has been unconditionally using a GCC extension,
> apparently since at least 2010; the patch introducing the varargs define
> in tracepoint.c was 7c56ce7 (2010-04-09).
>
> The patch proposes replacing this with the corresponding C99 construct.
>
> So, I'd like to propose we allow the use of C99 in gdb. In particular I
> think we ought to require a C99 preprocessor -- enabling this particular
> patch to go in and also allowing the use of "//" comments.
Perhaps it is time to move on and start requiring a C99 compiler for GDB.
But "//" comments are offensive to real C programmers! ;)
Seriously though. This points out that such a switch has some
consequences for our coding standards. We have a fairly consistent
coding style in GDB, which makes it easy for people to move around in
the codebase without getting distracted by the "looks" of the code. I
think it's worth some effort to keep it that way. And allowing "//"
comments isn't going to help. I'd vote for not using them at all.
However, a more important C99 "misfeature" that affects the coding
standard is the possibility to declare varaibles anywhere in the code.
We should not allow this, except for declaring loop variables in a
for() statement.
next prev parent reply other threads:[~2013-07-16 21:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 20:51 C99 Tom Tromey
2013-07-16 21:23 ` Mark Kettenis [this message]
2013-07-16 21:40 ` C99 Doug Evans
2013-07-17 20:48 ` C99 Mark Kettenis
2013-07-17 21:12 ` C99 Doug Evans
2013-07-17 8:11 ` C99? No, portability John Gilmore
2013-07-17 22:38 ` Doug Evans
2013-07-18 15:27 ` John Kearney
2013-07-19 17:39 ` Doug Evans
2013-07-18 6:54 ` C99 Yao Qi
2013-07-17 3:49 ` C99 Eli Zaretskii
2013-07-17 17:54 ` C99 Doug Evans
2013-07-18 2:47 ` C99 Yao Qi
2013-07-18 6:46 ` C99 Doug Evans
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=201307162122.r6GLMlMx012078@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb@sourceware.org \
--cc=tromey@redhat.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