diff options
| author | Paul Eggert | 2017-11-03 02:20:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-11-03 02:20:55 -0700 |
| commit | c911b27aff8dd15cd47a063dc958e6dae74dde06 (patch) | |
| tree | 67b4f77f10fc77aa74af70e658a65f6cb5420a64 /src | |
| parent | a87ce5c4b41ca8146c764b1186a6162c069b1933 (diff) | |
| download | emacs-c911b27aff8dd15cd47a063dc958e6dae74dde06.tar.gz emacs-c911b27aff8dd15cd47a063dc958e6dae74dde06.zip | |
Change GCALIGNMENT back to an integer literal
* src/lisp.h (GCALIGNMENT): Change it back to a macro
that expands to a literal integer constant, for older GCC.
I had mistakenly thought that only MSVC had the problem.
Problem repored by Eli Zaretskii (Bug#29040#69).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h index a71ba22618e..4dd472053bf 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -233,7 +233,9 @@ extern bool suppress_checking EXTERNALLY_VISIBLE; | |||
| 233 | 233 | ||
| 234 | enum Lisp_Bits | 234 | enum Lisp_Bits |
| 235 | { | 235 | { |
| 236 | GCALIGNMENT = 1 << GCTYPEBITS, | 236 | /* 2**GCTYPEBITS. This must be a macro that expands to a literal |
| 237 | integer constant, for older versions of GCC (through at least 4.9). */ | ||
| 238 | #define GCALIGNMENT 8 | ||
| 237 | 239 | ||
| 238 | /* Number of bits in a Lisp_Object value, not counting the tag. */ | 240 | /* Number of bits in a Lisp_Object value, not counting the tag. */ |
| 239 | VALBITS = EMACS_INT_WIDTH - GCTYPEBITS, | 241 | VALBITS = EMACS_INT_WIDTH - GCTYPEBITS, |
| @@ -245,6 +247,10 @@ enum Lisp_Bits | |||
| 245 | FIXNUM_BITS = VALBITS + 1 | 247 | FIXNUM_BITS = VALBITS + 1 |
| 246 | }; | 248 | }; |
| 247 | 249 | ||
| 250 | #if GCALIGNMENT != 1 << GCTYPEBITS | ||
| 251 | # error "GCALIGNMENT and GCTYPEBITS are inconsistent" | ||
| 252 | #endif | ||
| 253 | |||
| 248 | /* The maximum value that can be stored in a EMACS_INT, assuming all | 254 | /* The maximum value that can be stored in a EMACS_INT, assuming all |
| 249 | bits other than the type bits contribute to a nonnegative signed value. | 255 | bits other than the type bits contribute to a nonnegative signed value. |
| 250 | This can be used in #if, e.g., '#if USE_LSB_TAG' below expands to an | 256 | This can be used in #if, e.g., '#if USE_LSB_TAG' below expands to an |