diff options
| author | Paul Eggert | 2011-03-15 14:56:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-15 14:56:37 -0700 |
| commit | e5aab7e74931e4b4b0fd21abf4a6ea5b7f5134f4 (patch) | |
| tree | 1021a2e6d6d8dff1f7bde16072e4bf30ce349e66 /src/alloc.c | |
| parent | 76ef09b7c8407733a7e55dd1b14e7807ba83ae5b (diff) | |
| download | emacs-e5aab7e74931e4b4b0fd21abf4a6ea5b7f5134f4.tar.gz emacs-e5aab7e74931e4b4b0fd21abf4a6ea5b7f5134f4.zip | |
* alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
* lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
avoids undefined behavior in theory.
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 d6b64de5af9..1ad8af0d61a 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2653,17 +2653,17 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2653 | return val; | 2653 | return val; |
| 2654 | } | 2654 | } |
| 2655 | 2655 | ||
| 2656 | #ifdef GC_CHECK_CONS_LIST | ||
| 2656 | /* Get an error now if there's any junk in the cons free list. */ | 2657 | /* Get an error now if there's any junk in the cons free list. */ |
| 2657 | void | 2658 | void |
| 2658 | check_cons_list (void) | 2659 | check_cons_list (void) |
| 2659 | { | 2660 | { |
| 2660 | #ifdef GC_CHECK_CONS_LIST | ||
| 2661 | struct Lisp_Cons *tail = cons_free_list; | 2661 | struct Lisp_Cons *tail = cons_free_list; |
| 2662 | 2662 | ||
| 2663 | while (tail) | 2663 | while (tail) |
| 2664 | tail = tail->u.chain; | 2664 | tail = tail->u.chain; |
| 2665 | #endif | ||
| 2666 | } | 2665 | } |
| 2666 | #endif | ||
| 2667 | 2667 | ||
| 2668 | /* Make a list of 1, 2, 3, 4 or 5 specified objects. */ | 2668 | /* Make a list of 1, 2, 3, 4 or 5 specified objects. */ |
| 2669 | 2669 | ||