From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
Subject: Re: GCC 4.9.1 suggests -std=c99
Date: Tue, 09 Sep 2014 18:50:22 +0300 [thread overview]
Message-ID: <83tx4gaj41.fsf@gnu.org> (raw)
In-Reply-To: <540F1B12.2070603@cs.ucla.edu>
> Date: Tue, 09 Sep 2014 08:21:54 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: dmantipov@yandex.ru, emacs-devel@gnu.org
>
> Eli Zaretskii wrote:
> > do we actually want to use such initializations inside a for loop?
>
> It's a better style, as it scopes the control variable better. And we
> are assuming C99 in the trunk nowadays.
>
> It will be a portability problem only if we run into a pre-C99 compiler
> that supports C99-style statements-before-declarations (which we're
> already using in the trunk) but does not support a C99-style declaration
> as the first clause of a for-loop. I'd be a bit surprised if such a
> compiler were in current use (but then I've been surprised before ...).
I think we should have discussed whether to use these C99 features
before actually starting using them. Emacs definitely has certain
coding style, which doesn't include these.
I understand the rationale for using C99 features for which there's no
reasonably practical alternatives, or rely on C99 semantics where
earlier versions left things undefined. But the above don't belong to
either class.
next prev parent reply other threads:[~2014-09-09 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 14:30 GCC 4.9.1 suggests -std=c99 Dmitry Antipov
2014-09-09 14:43 ` Eli Zaretskii
2014-09-09 14:58 ` Paul Eggert
2014-09-09 15:06 ` Eli Zaretskii
2014-09-09 15:21 ` Paul Eggert
2014-09-09 15:50 ` Eli Zaretskii [this message]
2014-09-09 16:42 ` Dmitry Antipov
2014-09-09 17:11 ` Paul Eggert
2014-09-09 15:38 ` Dmitry Antipov
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=83tx4gaj41.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmantipov@yandex.ru \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.