mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-27 11:40:45 -07:00
cmp: don't return nil in compile if compilation failed
The ansi standard states that compile has to return a compiled function. Fixes various errors in the ansi-test suite.
This commit is contained in:
parent
87a1c5faed
commit
d908394007
1 changed files with 11 additions and 1 deletions
|
|
@ -821,7 +821,17 @@ after compilation."
|
|||
(cmp-delete-file h-pathname)
|
||||
(cmp-delete-file so-pathname)
|
||||
(mapc 'cmp-delete-file tmp-names)
|
||||
(let ((output (or name (and (boundp 'GAZONK) (symbol-value 'GAZONK)))))
|
||||
(let ((output (or name (and (boundp 'GAZONK) (symbol-value 'GAZONK))
|
||||
#'(lambda (&rest x)
|
||||
(declare (ignore x))
|
||||
;; if compilation failed, we return this
|
||||
;; function which does nothing but resignal
|
||||
;; the compiler errors we got
|
||||
(loop for c in compiler-conditions
|
||||
if (typep c 'compiler-error)
|
||||
do (apply #'si::simple-program-error
|
||||
(simple-condition-format-control c)
|
||||
(simple-condition-format-arguments c)))))))
|
||||
;; By unsetting GAZONK we avoid spurious references to the
|
||||
;; loaded code.
|
||||
(set 'GAZONK nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue