From: Paul Eggert <eggert@cs.ucla.edu>
To: Daniel Colascione <dancol@dancol.org>
Cc: Emacs Development <Emacs-devel@gnu.org>
Subject: Re: Why named structs and unions? C11 supports anonymous structs and unions
Date: Sun, 11 Feb 2018 19:56:02 -0800 [thread overview]
Message-ID: <60430523-09f3-0873-de9f-c134967fdb50@cs.ucla.edu> (raw)
In-Reply-To: <53a9ab33-cdd5-99b3-aeef-f52776a5bf8d@dancol.org>
Daniel Colascione wrote:
> Now we get all the alignment benefits of alignas, but without the ugly "u.s." stuff.
That assumes C11, though. Currently Emacs assumes only C99. Although Emacs can
use C11 features when 'configure' determines them to work, I don't offhand see
how this could be done for this particular feature without contorting the C code
even more than it's contorted now.
> Instead of XCONS(c)->car, we now write XCONS(c)->u.s.car.
Normally in C code we write XCAR (c) instead of writing either form. The u.s.
business is intended to be used only within a small set of source-code locations
that need to know the internal structure of Lisp objects, and most C code
shouldn't care whether it's '->car' or '->u.s.car'. Admittedly there are more
occurrences of '->u.s.' than we'd like.
next prev parent reply other threads:[~2018-02-12 3:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 3:14 Why named structs and unions? C11 supports anonymous structs and unions Daniel Colascione
2018-02-12 3:56 ` Paul Eggert [this message]
2018-02-12 4:09 ` Daniel Colascione
2018-02-12 7:28 ` Paul Eggert
2018-02-12 20:22 ` Daniel Colascione
2018-02-12 20:37 ` Paul Eggert
2018-02-12 22:18 ` Richard Stallman
2018-02-12 22:18 ` Richard Stallman
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=60430523-09f3-0873-de9f-c134967fdb50@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=Emacs-devel@gnu.org \
--cc=dancol@dancol.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 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).