diff options
| author | Paul Eggert | 2011-04-02 22:41:46 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-04-02 22:41:46 -0700 |
| commit | b895abced91e6dcedf6c580ea3e51befc5c757c1 (patch) | |
| tree | 63e086d0c5092fb7ba73d4dd5816da4e9e8f14ca /src/alloc.c | |
| parent | 6f076cc771577096ebebb0af50462c6d0a4c112e (diff) | |
| download | emacs-b895abced91e6dcedf6c580ea3e51befc5c757c1.tar.gz emacs-b895abced91e6dcedf6c580ea3e51befc5c757c1.zip | |
* alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
Otherwise, GCC 4.6.0 optimizes the loop check away since the check
can always succeed if overflow has undefined behavior.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 07f1caae46b..54c4760abab 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5221,7 +5221,7 @@ int last_marked_index; | |||
| 5221 | links of a list, in mark_object. In debugging, | 5221 | links of a list, in mark_object. In debugging, |
| 5222 | the call to abort will hit a breakpoint. | 5222 | the call to abort will hit a breakpoint. |
| 5223 | Normally this is zero and the check never goes off. */ | 5223 | Normally this is zero and the check never goes off. */ |
| 5224 | static int mark_object_loop_halt; | 5224 | static size_t mark_object_loop_halt; |
| 5225 | 5225 | ||
| 5226 | static void | 5226 | static void |
| 5227 | mark_vectorlike (struct Lisp_Vector *ptr) | 5227 | mark_vectorlike (struct Lisp_Vector *ptr) |
| @@ -5278,7 +5278,7 @@ mark_object (Lisp_Object arg) | |||
| 5278 | void *po; | 5278 | void *po; |
| 5279 | struct mem_node *m; | 5279 | struct mem_node *m; |
| 5280 | #endif | 5280 | #endif |
| 5281 | int cdr_count = 0; | 5281 | size_t cdr_count = 0; |
| 5282 | 5282 | ||
| 5283 | loop: | 5283 | loop: |
| 5284 | 5284 | ||