emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: windows build help


From: Paul Eggert
Subject: Re: windows build help
Date: Sun, 15 Oct 2017 23:49:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

   > one can write Elisp code that compiles to different .elc files
   > depending whether the compiling Emacs is built for a 32 or 64 bit machine,

Just for curiosity's sake, would anyone like to tell me what circumstances
this happens in?

For example, given this source code:

(defconst x (* 32768 32768))

On a 64-bit machine, byte-compiling generates an .elc file containing this:

(defconst x 1073741824)

On a 32-bit machine, byte-compiling the same source code generates an .elc file containing this instead:

(defconst x 0)

due to multiplication overflow in this Emacs's integers, which use 30-bit two's complement. Each .elc file is correct for the Emacs it is built with, but incorrect for the other Emacs.

GNU Emacs source code should not do this sort of thing, since the .elc files distributed in its tarballs are supposed to be portable.



reply via email to

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