From: "Johan Bockgård" <bojohan@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master b7fa6b1 1/4: Simplify use of FOR_EACH_TAIL
Date: Tue, 07 Feb 2017 21:45:34 +0100 [thread overview]
Message-ID: <87a89xpw5t.fsf@gnu.org> (raw)
In-Reply-To: <d45bfa24-6a76-b2b3-4e15-6e24f164a682@cs.ucla.edu> (Paul Eggert's message of "Mon, 6 Feb 2017 17:04:20 -0800")
Paul Eggert <eggert@cs.ucla.edu> writes:
> Portable C99 code cannot declare two or more identifiers in the same
> for-loop, due to an ambiguity in the C99 standard, which says (6.8.5
> para 3) "The declaration part of a for statement shall only declare
> identifiers for objects having storage class auto or register." This
> constraint can be interpreted as meaning (A) when a for-statement
> declares an object's name, the name must have storage class auto or
> register, or (B) all identifiers declared by a for-statement must name
> objects with storage class auto or register. Although I suspect (A)
> was intended and that's what GCC does, (B) is also a plausible
> interpretation and that's what Clang does. Interpretation (B)
> disallows anonymous structs here, as such structs declare member
> names.
"The intent is clear enough; [...] identifiers which do not denote
objects with auto or register storage classes, [...] are not allowed
in this context."
http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_277.htm
next prev parent reply other threads:[~2017-02-07 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170205213033.19755.8264@vcs.savannah.gnu.org>
[not found] ` <20170205213034.20306220171@vcs.savannah.gnu.org>
2017-02-06 1:19 ` [Emacs-diffs] master b7fa6b1 1/4: Simplify use of FOR_EACH_TAIL Stefan Monnier
2017-02-06 5:23 ` Paul Eggert
2017-02-06 15:37 ` Eli Zaretskii
2017-02-07 1:35 ` Paul Eggert
2017-02-07 15:32 ` Eli Zaretskii
2017-02-06 17:38 ` Davis Herring
2017-02-07 1:04 ` Paul Eggert
2017-02-07 20:45 ` Johan Bockgård [this message]
2017-02-07 21:50 ` Richard Stallman
2017-02-07 22:18 ` Paul Eggert
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=87a89xpw5t.fsf@gnu.org \
--to=bojohan@gnu.org \
--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.