[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 96ef76e: Fix typeof portability issue with bitfield
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 96ef76e: Fix typeof portability issue with bitfields |
Date: |
Thu, 15 Aug 2019 13:53:30 -0400 (EDT) |
branch: master
commit 96ef76e4e7df73802bf1f2a19c96a143ae365b66
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Fix typeof portability issue with bitfields
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2019-08/msg00300.html
* src/lisp.h (lisp_h_make_fixnum): Use typeof (+(n)) instead
of typeof (n), so that it works with compilers that do
not allow typeof to be applied to a bitfield.
---
src/lisp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lisp.h b/src/lisp.h
index 1c98925..56ad99b 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -401,7 +401,7 @@ typedef EMACS_INT Lisp_Word;
XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
# if defined HAVE_STATEMENT_EXPRESSIONS && defined HAVE_TYPEOF
# define lisp_h_make_fixnum(n) \
- ({ typeof (n) lisp_h_make_fixnum_n = n; \
+ ({ typeof (+(n)) lisp_h_make_fixnum_n = n; \
eassert (!FIXNUM_OVERFLOW_P (lisp_h_make_fixnum_n)); \
lisp_h_make_fixnum_wrap (lisp_h_make_fixnum_n); })
# else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 96ef76e: Fix typeof portability issue with bitfields,
Paul Eggert <=