diff options
author | Jim Blandy <jimb@red-bean.com> | 1996-12-18 21:39:44 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1996-12-18 21:39:44 +0000 |
commit | 3323ad081e607467dccf7c68d9c33e8f99a8fd85 (patch) | |
tree | 0bdeeb66eb193661bfb58f9b82af973c96e012ea /libguile/stacks.c | |
parent | 1b306e162338208673289a3275bcebb8f8a6c048 (diff) | |
download | guile-3323ad081e607467dccf7c68d9c33e8f99a8fd85.tar.gz |
Give GCC more control flow information, so it can be sure that
variables aren't used uninitialized.
* error.h (scm_error, scm_syserror, scm_syserror_msg,
scm_sysmissing, scm_num_overflow, scm_out_of_range,
scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
scm_misc_error): Tell GCC that these functions never return.
* struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
out the field type, call abort if SCM_ASSERT returns, to placate
the optimizer.
* stacks.c (scm_make_stack, scm_last_stack_frame): abort if
scm_wta ever returns. We can't handle this case anyway, and this
gives the optimizer more information.
* unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
scm_wta ever returns.
Diffstat (limited to 'libguile/stacks.c')
-rw-r--r-- | libguile/stacks.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libguile/stacks.c b/libguile/stacks.c index c1813f288..fc595a3bc 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -357,7 +357,11 @@ scm_make_stack (args) dframe = (scm_debug_frame *) ((SCM_STACKITEM *) SCM_DFRAME (obj) + offset); } - else scm_wta (obj, (char *) SCM_ARG1, s_make_stack); + else + { + scm_wta (obj, (char *) SCM_ARG1, s_make_stack); + abort (); + } } /* Count number of frames. Also get stack id tag and check whether @@ -511,7 +515,11 @@ scm_last_stack_frame (obj) #endif dframe = (scm_debug_frame *) ((SCM_STACKITEM *) SCM_DFRAME (obj) + offset); } - else scm_wta (obj, (char *) SCM_ARG1, s_last_stack_frame); + else + { + scm_wta (obj, (char *) SCM_ARG1, s_last_stack_frame); + abort (); + } if (!dframe || SCM_VOIDFRAMEP (*dframe)) return SCM_BOOL_F; |