GNU bug report logs - #63556
29.0.90; Use of _Generic breaks Emacs build on GCC <4.9

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Wed, 17 May 2023 17:39:02 UTC

Severity: normal

Found in version 29.0.90

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Po Lu <luangruo <at> yahoo.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Spencer Baugh <sbaugh <at> janestreet.com>, 63556 <at> debbugs.gnu.org
Subject: bug#63556: 29.0.90; Use of _Generic breaks Emacs build on GCC <4.9
Date: Fri, 19 May 2023 08:46:02 +0800
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> There would be problems in doing that. GCC and Clang both have
> problems with _Generic (suggested by this original bug report), and
> some of them have to do with which warnings you've enabled. The
> configure-time check would run without the warnings whereas the build
> would run with them.
>
> This is partly why intprops-internal.h has given up on _Generic with
> GCC and Clang; see its ifdefs. I assumed that these problems didn't
> apply to their simple use in elogb, but apparently I assumed
> incorrectly.

[...]

>> Btw, couldn't the macro be defined to something along the lines of this
>> when the compiler only supports C99?
>>    #define foo(expression)			  \
>>      (sizeof (expression) == sizeof (signed char)  \
>
> That wouldn't work on unusual platforms that have padding bits. Of
> course we could simply refuse to port to targets like that; still, I'd
> be reluctant to do that just for this little issue.

How does intprops.h work on such systems?

> I couldn't measure the slowdown in this case. Until it's measurable I
> wouldn't worry about it. To some extent I put in that _Generic
> originally more as documentation than as an actual attempt to speed
> things up.

OK, but that's the second use of `long long' in src/ outside of
NT-specific files.  I can't help but be a little skittish.




This bug report was last modified 2 years and 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.