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

From: Paul Eggert <[email-masked]>
Date: Tue, 26 Apr 2011 21:30:16 -0700

On 04/26/11 18:11, Stefan Monnier wrote:
> But that doesn't explain why we need "struct vectorlike_header".
> Since the macros could cast to "EMACS_UINT*" instead to access to size
> field and that give us the same result.

The C standard allows implementations where 'EMACS_UINT *' uses a
different representation from 'struct buffer *'.  On a word-based
machine, for example, 'EMACS_INT *' might have a one-word representation,
but 'struct buffer *' would have to be byte-addressible (as all
struct pointers must "smell the same" in C) and therefore might have
two words.  On such a machine, ((EMACS_UINT) p) would return a
different integer than ((EMACS_UINT) &p->size).

In practice, though, I doubt whether Emacs will ever be ported
to a word-based machine, so this objection is mostly theoretical,
and if you prefer the macros to cast to "EMACS_UINT *" instead
I could easily write a patch to do that.