diff options
| author | Paul Eggert | 2011-06-18 12:13:46 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-18 12:13:46 -0700 |
| commit | 9a8e8d9b22be9652ed2f2e8acc02e1139b34d9dd (patch) | |
| tree | d5fc4d3bd2f8c081a6ab83e91108b1d1253c0368 /src | |
| parent | b61cc01c06234b0f48b5485d7d592c1c81c05c70 (diff) | |
| download | emacs-9a8e8d9b22be9652ed2f2e8acc02e1139b34d9dd.tar.gz emacs-9a8e8d9b22be9652ed2f2e8acc02e1139b34d9dd.zip | |
* lisp.h (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
not EMACS_UINT and EMACS_INT, when converting pointer to integer.
This avoids a GCC warning when WIDE_EMACS_INT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/lisp.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 04e8aeef848..aa0a0a39bb8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT. | 6 | (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT. |
| 7 | We prefer signed types, and the value cannot exceed the EMACS_INT | 7 | We prefer signed types, and the value cannot exceed the EMACS_INT |
| 8 | range anyway (because otherwise the length would not be representable). | 8 | range anyway (because otherwise the length would not be representable). |
| 9 | (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t, | ||
| 10 | not EMACS_UINT and EMACS_INT, when converting pointer to integer. | ||
| 11 | This avoids a GCC warning when WIDE_EMACS_INT. | ||
| 9 | 12 | ||
| 10 | * indent.c (sane_tab_width): New function. | 13 | * indent.c (sane_tab_width): New function. |
| 11 | (current_column, scan_for_column, Findent_to, position_indentation) | 14 | (current_column, scan_for_column, Findent_to, position_indentation) |
diff --git a/src/lisp.h b/src/lisp.h index 108712a7894..2dcf73b7506 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -494,8 +494,8 @@ enum pvec_type | |||
| 494 | #ifdef USE_LSB_TAG | 494 | #ifdef USE_LSB_TAG |
| 495 | 495 | ||
| 496 | # define XSET(var, vartype, ptr) \ | 496 | # define XSET(var, vartype, ptr) \ |
| 497 | (eassert ((((EMACS_UINT) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \ | 497 | (eassert ((((uintptr_t) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \ |
| 498 | (var).u.val = ((EMACS_UINT) (ptr)) >> GCTYPEBITS, \ | 498 | (var).u.val = ((uintptr_t) (ptr)) >> GCTYPEBITS, \ |
| 499 | (var).u.type = ((char) (vartype))) | 499 | (var).u.type = ((char) (vartype))) |
| 500 | 500 | ||
| 501 | /* Some versions of gcc seem to consider the bitfield width when issuing | 501 | /* Some versions of gcc seem to consider the bitfield width when issuing |
| @@ -512,7 +512,7 @@ enum pvec_type | |||
| 512 | # define XSETFASTINT(a, b) ((a).i = (b)) | 512 | # define XSETFASTINT(a, b) ((a).i = (b)) |
| 513 | 513 | ||
| 514 | # define XSET(var, vartype, ptr) \ | 514 | # define XSET(var, vartype, ptr) \ |
| 515 | (((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype)))) | 515 | (((var).s.val = ((intptr_t) (ptr))), ((var).s.type = ((char) (vartype)))) |
| 516 | 516 | ||
| 517 | #ifdef DATA_SEG_BITS | 517 | #ifdef DATA_SEG_BITS |
| 518 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers | 518 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers |