[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More over-engineering
From: |
Eli Zaretskii |
Subject: |
Re: More over-engineering |
Date: |
Mon, 30 Nov 2015 22:04:51 +0200 |
> From: Stefan Monnier <address@hidden>
> Date: Mon, 30 Nov 2015 14:40:02 -0500
> Cc: Aurélien Aptel <address@hidden>,
> Emacs development discussions <address@hidden>
>
> > I agree. Although I'm a fan of --with-wide-int, I don't think it should
> > force this extra complication in modules.
>
> I managed to make it work for --with-wide-int without having to
> re-compile the modules (those rare 64bit values which can't be crammed
> into 32bit go through an extra proxy object).
I get compilation warnings with those changes:
emacs-module.c: In function 'value_to_lisp':
emacs-module.c:853:19: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
EMACS_INT tmp = (EMACS_INT)v;
^
emacs-module.c:859:7: warning: passing argument 1 of 'make_lisp_ptr' makes
pointer from integer without a cast [enabled by default]
o = make_lisp_ptr ((tmp - tag) >> GCTYPEBITS, tag); break;
^
In file included from emacs-module.c:30:0:
lisp.h:1095:1: note: expected 'void *' but argument is of type 'EMACS_INT'
make_lisp_ptr (void *ptr, enum Lisp_Type type)
^
emacs-module.c:861:26: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
o = make_lisp_ptr ((void*)(tmp - tag), tag);
^
emacs-module.c: In function 'lisp_to_value':
emacs-module.c:895:32: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
if (val == (EMACS_UINT)(emacs_value)val)
^
emacs-module.c:895:20: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (val == (EMACS_UINT)(emacs_value)val)
^
emacs-module.c:897:29: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
emacs_value v = (emacs_value) ((val << GCTYPEBITS) | tag);
^
emacs-module.c:907:14: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
if (((EMACS_UINT)ptr) & ((1 << GCTYPEBITS) - 1))
^
emacs-module.c:913:40: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
emacs_value v = (emacs_value)(((EMACS_UINT) ptr) | tag);
^
emacs-module.c:913:25: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
emacs_value v = (emacs_value)(((EMACS_UINT) ptr) | tag);
^
- Re: More over-engineering, (continued)
- Re: More over-engineering, Stefan Monnier, 2015/11/27
- Re: More over-engineering, Eli Zaretskii, 2015/11/27
- Re: More over-engineering, Stefan Monnier, 2015/11/27
- Re: More over-engineering, Eli Zaretskii, 2015/11/27
- Re: More over-engineering, Stefan Monnier, 2015/11/27
- Re: More over-engineering, Eli Zaretskii, 2015/11/28
- Re: More over-engineering, Stefan Monnier, 2015/11/28
- Re: More over-engineering, Eli Zaretskii, 2015/11/28
- Re: More over-engineering, Paul Eggert, 2015/11/28
- Re: More over-engineering, Stefan Monnier, 2015/11/30
- Re: More over-engineering,
Eli Zaretskii <=
- Re: More over-engineering, Stefan Monnier, 2015/11/30
- Re: More over-engineering, Eli Zaretskii, 2015/11/30