emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master bc78ff2 2/2: Use 0 for Qnil


From: YAMAMOTO Mitsuharu
Subject: Re: [Emacs-diffs] master bc78ff2 2/2: Use 0 for Qnil
Date: Thu, 08 Jan 2015 14:23:30 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shij┼Ź) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Wed, 7 Jan 2015 22:57:59 +0100, "Herbert J. Skuhra" <address@hidden> 
>>>>> said:

> Hi,
> after this commit I can no longer build Emacs on Mac OS X (10.10.2):

> Loading /Users/herbert/source/emacs/lisp/help.el (source)...
> Loading /Users/herbert/source/emacs/lisp/jka-cmpr-hook.el (source)...
> Loading /Users/herbert/source/emacs/lisp/epa-hook.el (source)...
> Loading /Users/herbert/source/emacs/lisp/international/mule-cmds.el
> (source)...
> Loading /Users/herbert/source/emacs/lisp/case-table.el (source)...
> Loading /Users/herbert/source/emacs/lisp/international/characters.el
> (source)...
> make[2]: *** [bootstrap-emacs] Illegal instruction: 4
> make[1]: *** [src] Error 2
> make: *** [bootstrap] Error 2

> Building with Homebrew also fails.

> 58f2d6e does compile.

In src/lisp.h, we have:

# define lisp_h_XUNTAG(a, type) XUNTAGBASE (a, type, 0)
# define lisp_h_XUNTAGBASE(a, type, base) \
    ((void *) ((char *) (base) - (type) + (intptr_t) XLI (a)))

With the above macros, XUNTAG (a, type) is expanded to:

  ((void *) ((char *) (0) - (type) + (intptr_t) XLI (a)))

It is relative to the NULL pointer and clang seems to treat its
dereference as an undefined behavior.  Reverting the definition of
lisp_h_XUNTAG to the previous version works for me.

# define lisp_h_XUNTAG(a, type) ((void *) (XLI (a) - (type)))

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

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