GNU bug report logs -
#8525
Lisp reader and string-to-number bugs and inconsistencies
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Wed, 20 Apr 2011 09:29:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 8525-done <at> debbugs.gnu.org (full text, mbox):
> OK, thanks, I added comments for that, and for the other areas where
> you requested comments, and merged it into the trunk. I'll mark this
> bug as done. This merge also fixes bug 8525, which I'll also mark.
So IIUC your answer to my question "why do we need the struct
vectorlike_header?" is
/* Header of vector-like objects. This documents the layout constraints on
vectors and pseudovectors other than struct Lisp_Subr. It also prevents
compilers from being fooled by Emacs's type punning: the XSETPSEUDOVECTOR
and PSEUDOVECTORP macros cast their pointers to struct vectorlike_header *,
because when two such pointers potentially alias, a compiler won't
incorrectly reorder loads and stores to their size fields. See
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8546>. */
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.
Stefan
This bug report was last modified 14 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.