unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: sbaugh@janestreet.com, eggert@cs.ucla.edu, 63556@debbugs.gnu.org
Subject: bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9
Date: Thu, 18 May 2023 17:12:27 +0300	[thread overview]
Message-ID: <83r0rdvid0.fsf@gnu.org> (raw)
In-Reply-To: <87r0rd4vww.fsf@yahoo.com> (message from Po Lu on Thu, 18 May 2023 21:21:51 +0800)

> From: Po Lu <luangruo@yahoo.com>
> Cc: eggert@cs.ucla.edu,  sbaugh@janestreet.com,  63556@debbugs.gnu.org
> Date: Thu, 18 May 2023 21:21:51 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Depends on how complex is that, and what problem does it solve.
> 
> The problem of using `long long' on systems with less than 64
> significant bits in their words.  I don't think that's a particularly
> good idea -- once such uses pile up, Emacs will gradually become slower
> and slower on such systems.

What does this have to do with _Generic?

> >>   #define foo(expression)			  \
> >>     (sizeof (expression) == sizeof (signed char)  \
> >>      ? code_for_signed_char			  \
> >>      : (sizeof (expression) == sizeof (short int) \
> >> 	? code_for_short_int			  \
> >> 	: (sizeof (expression) == sizeof (int)	  \
> >> 	   ? code_for_int			  \
> >> 	   ... and so on
> >
> > AFAIR, sizeof is a compile-time expression, the preprocessor cannot
> > evaluate it.
> 
> It doesn't have to be evaluated by the preprocessor (and nor is
> _Generic.)  It just needs to expand to an expression that does the right
> thing.

And what is "the right thing" in this case?

I guess I don't understand what this has to do with _Generic.





  reply	other threads:[~2023-05-18 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 17:38 bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9 Spencer Baugh
2023-05-17 17:45 ` Eli Zaretskii
2023-05-17 17:57 ` Paul Eggert
2023-05-18 11:11   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-18 11:42     ` Eli Zaretskii
2023-05-18 13:21       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-18 14:12         ` Eli Zaretskii [this message]
2023-05-18 14:40     ` Paul Eggert
2023-05-19  0:46       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-19  3:05         ` Paul Eggert
2023-05-19  3:18           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-18 20:32   ` 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=83r0rdvid0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63556@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=luangruo@yahoo.com \
    --cc=sbaugh@janestreet.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).