[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 3ed79cd: Separate bytecode stack
From: |
Eli Zaretskii |
Subject: |
Re: master 3ed79cd: Separate bytecode stack |
Date: |
Sun, 13 Mar 2022 19:39:45 +0200 |
This changeset causes compilation warning in a 32-bit build in which
!LISP_WORDS_ARE_POINTERS and which was configured --with-wide-int:
In file included from bytecode.c:22:
bytecode.c: In function 'sf_set_ptr':
bytecode.c:396:20: warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
396 | fp[index] = XIL ((EMACS_INT)value);
| ^
lisp.h:342:26: note: in definition of macro 'lisp_h_XIL'
342 | # define lisp_h_XIL(i) (i)
| ^
bytecode.c:396:15: note: in expansion of macro 'XIL'
396 | fp[index] = XIL ((EMACS_INT)value);
| ^~~
The problem is that pointers are 32-bit wide, but EMACS_INT is a 64-bit
integer data type (and not a pointer).
More generally, I'm quite nervous to see void * pointers and integers
being put into the same array. I think we'd like a cleaner, more
obviously correct, code.
Thanks.
- Re: master 3ed79cd: Separate bytecode stack,
Eli Zaretskii <=
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Robert Pluim, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Stefan Monnier, 2022/03/15