mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
floating point exceptions: be more ansi-compliant
signal exceptions on underflows, overflows, division by zero etc.
This commit is contained in:
parent
626f4829bb
commit
e6fcb5b7a8
2 changed files with 4 additions and 3 deletions
|
|
@ -1361,9 +1361,9 @@ install_fpe_signal_handlers()
|
|||
if (ecl_option_values[ECL_OPT_TRAP_SIGFPE]) {
|
||||
mysignal(SIGFPE, fpe_signal_handler);
|
||||
si_trap_fpe(ECL_T, ECL_T);
|
||||
# ifdef ECL_IEEE_FP
|
||||
/* By default deactivate errors and accept
|
||||
* denormals in floating point computations */
|
||||
# if 0 /* defined(ECL_IEEE_FP) */
|
||||
/* By default deactivate errors and accept denormals
|
||||
* in floating point computations. */
|
||||
si_trap_fpe(@'floating-point-invalid-operation', ECL_NIL);
|
||||
si_trap_fpe(@'division-by-zero', ECL_NIL);
|
||||
si_trap_fpe(@'floating-point-overflow', ECL_NIL);
|
||||
|
|
|
|||
|
|
@ -398,6 +398,7 @@ The top-level loop of ECL. It is called by default when ECL is invoked."
|
|||
(in-package "CL-USER")
|
||||
|
||||
(unless (or *lisp-initialized* (null process-command-line))
|
||||
(si:trap-fpe :last t)
|
||||
(process-command-args)
|
||||
(format t "ECL (Embeddable Common-Lisp) ~A (git:~D)"
|
||||
(lisp-implementation-version)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue