mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
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.
This commit is contained in:
parent
1b306e1623
commit
3323ad081e
2 changed files with 33 additions and 12 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue