all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 3ed79cd: Separate bytecode stack
Date: Sun, 13 Mar 2022 19:39:45 +0200	[thread overview]
Message-ID: <83lexdlpjy.fsf@gnu.org> (raw)

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.



             reply	other threads:[~2022-03-13 17:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13 17:39 Eli Zaretskii [this message]
2022-03-13 18:44 ` master 3ed79cd: Separate bytecode stack 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lexdlpjy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.