unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 3ed79cd: Separate bytecode stack
@ 2022-03-13 17:39 Eli Zaretskii
  2022-03-13 18:44 ` Mattias Engdegård
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-03-13 17:39 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: emacs-devel

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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-15 19:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-13 17:39 master 3ed79cd: Separate bytecode stack Eli Zaretskii
2022-03-13 18:44 ` Mattias Engdegård
2022-03-13 18:50   ` Eli Zaretskii
2022-03-14 15:56     ` Mattias Engdegård
2022-03-14 17:15       ` Eli Zaretskii
2022-03-15 14:20         ` Mattias Engdegård
2022-03-15 14:42           ` Eli Zaretskii
2022-03-15 15:08             ` Robert Pluim
2022-03-15 19:29             ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).