[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9
From: |
Eli Zaretskii |
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 |
> 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.
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Spencer Baugh, 2023/05/17
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Eli Zaretskii, 2023/05/17
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Paul Eggert, 2023/05/17
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Paul Eggert, 2023/05/18
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Po Lu, 2023/05/18
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Paul Eggert, 2023/05/18
- bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Po Lu, 2023/05/18
bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9, Paul Eggert, 2023/05/18