unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Why not C99 designated initializer syntax?
Date: Mon, 12 Dec 2016 14:11:31 -0800	[thread overview]
Message-ID: <r025lgvk3ii4.fsf@dancol.org> (raw)
In-Reply-To: <CAArVCkSVd1XudWFvcW_NxMJfe-q=8guWQf1xesCi6rCSgqpwsg@mail.gmail.com> (Philipp Stephani's message of "Mon, 12 Dec 2016 22:07:05 +0000")

On Mon, Dec 12 2016, Philipp Stephani wrote:
> Daniel Colascione <dancol@dancol.org> schrieb am Mo., 12. Dez. 2016 um 22:56 Uhr:
>
>  Why are we writing code like this?
>
>  struct font_driver const nsfont_driver =
>    {
>    type: LISPSYM_INITIALLY (Qns),
>    case_sensitive: true,
>    ...
>    };
>
>  and not like this?
>
>  struct font_driver const nsfont_driver =
>    {
>    .type = LISPSYM_INITIALLY (Qns),
>    .case_sensitive = true,
>    ...
>    };
>
>  The former is a deprecated GCC extension.  The latter is the standard.
>  We need C99 these days anyway.
>
> Probably just an accident. There doesn't seem to be a ban on C99 designated initializers; for example, I've added
> some to emacs-module.c

An accident is possible.  It's just curious that this syntax has
appeared in brand-new code.



  reply	other threads:[~2016-12-12 22:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 21:56 Why not C99 designated initializer syntax? Daniel Colascione
2016-12-12 22:07 ` Philipp Stephani
2016-12-12 22:11   ` Daniel Colascione [this message]
2016-12-12 22:29 ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=r025lgvk3ii4.fsf@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).