all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 8546@debbugs.gnu.org
Subject: bug#8546: fix for Emacs pseudovector incompatibility with GCC 4.6.0
Date: Mon, 25 Apr 2011 11:05:20 -0300	[thread overview]
Message-ID: <jwv62q21m03.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4DB525C6.5020705@cs.ucla.edu> (Paul Eggert's message of "Mon, 25 Apr 2011 00:41:58 -0700")

> 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





  parent reply	other threads:[~2011-04-25 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25  7:41 bug#8546: fix for Emacs pseudovector incompatibility with GCC 4.6.0 Paul Eggert
2011-04-25 10:23 ` Eli Zaretskii
2011-04-25 19:30   ` Paul Eggert
2011-04-25 14:05 ` Stefan Monnier [this message]
2011-04-25 23:12   ` Paul Eggert
2011-04-26 12:46     ` Stefan Monnier
2011-04-26 20:06       ` Paul Eggert

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=jwv62q21m03.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=8546@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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.