mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
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.
This commit is contained in:
parent
af82a6248c
commit
96ef76e4e7
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue