emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why not C99 designated initializer syntax?


From: Philipp Stephani
Subject: Re: Why not C99 designated initializer syntax?
Date: Mon, 12 Dec 2016 22:07:05 +0000



Daniel Colascione <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]