[Top][All Lists]

[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 
    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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]