diff options
| author | Paul Eggert | 2020-05-26 00:47:24 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-05-26 00:47:48 -0700 |
| commit | 9f7bfb6cb06f1480a0904184cabf187e03628e55 (patch) | |
| tree | 89313fd0b6a9803297756742d2922c736d74ee9d /src | |
| parent | c4faf78a985aa8a147b4a5f7530ea43d0ad55835 (diff) | |
| download | emacs-9f7bfb6cb06f1480a0904184cabf187e03628e55.tar.gz emacs-9f7bfb6cb06f1480a0904184cabf187e03628e55.zip | |
Port struct Lisp_FLoat to oddball platforms
* src/lisp.h (struct Lisp_Float): Declare via
GCALIGNED_UNION_MEMBER, not via GCALIGNED_STRUCT, since alloc.c
creates these in arrays and GCALIGNED_STRUCT does not necessarily
suffice to align struct Lisp_Float when it’s used in an array.
This avoids undefined behavior on oddball machines where
sizeof (struct Lisp_Float) is not a multiple of 8 and the compiler
does not support __attribute__ ((aligned 8)).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h index 8bd83a888ce..f5d581a2f1d 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2801,8 +2801,10 @@ struct Lisp_Float | |||
| 2801 | { | 2801 | { |
| 2802 | double data; | 2802 | double data; |
| 2803 | struct Lisp_Float *chain; | 2803 | struct Lisp_Float *chain; |
| 2804 | GCALIGNED_UNION_MEMBER | ||
| 2804 | } u; | 2805 | } u; |
| 2805 | } GCALIGNED_STRUCT; | 2806 | }; |
| 2807 | verify (GCALIGNED (struct Lisp_Float)); | ||
| 2806 | 2808 | ||
| 2807 | INLINE bool | 2809 | INLINE bool |
| 2808 | (FLOATP) (Lisp_Object x) | 2810 | (FLOATP) (Lisp_Object x) |