bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8546: fix for Emacs pseudovector incompatibility with GCC 4.6.0


From: Stefan Monnier
Subject: bug#8546: fix for Emacs pseudovector incompatibility with GCC 4.6.0
Date: Mon, 25 Apr 2011 11:05:20 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> The patch is attached.  It's against my copy of Emacs, which has a few
> other fixes that I haven't had time to merge to the trunk yet.  But it
> should give a good feel for what's involved.

[ Please don't compress patches for review.  57KB is not that large.  ]

Thanks for tackling this problem.  A few questions/comments on your
patch (which I haven't reviewed completely):

   +struct vector_header

I'd call it vectorlike_header.
   
   +  {
   +    EMACS_UINT size;
   +    union {
   +      struct buffer *buffer;
   +      struct Lisp_Vector *vector;
   +    } next;
   +  };

Why do you need to handle buffers specially here?  That sounds wrong.

   +#define XVECTOR_SIZE(a) (XVECTOR (a)->header.size + 0)

why not use ASIZE?

   +#define XVECTOR_HEADER_SIZE(a) (((struct vector_header *) XPNTR (a))->size 
+ 0)

why do we need this variant with this weird set of type casts?

   +    * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
   +    special case.

Why does Lisp_Subr need to be a special case (IIUC this applies to
XSETTYPED_PSEUDOVECTOR and TYPED_PSEUDOVECTORP as well).

   +#define XSETPVECTYPESIZE(v, code, sizeval) \
   +  ((v)->header.size = PSEUDOVECTOR_FLAG | (code) | (sizeval))

Sounds good.


        Stefan





reply via email to

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