Skip to content

Compiler macros do not get shadowed by lexical function bindings.

When bootstrapping SBCL from ECL some problems occur. SBCL should bootstrap from any conforming CL (it works for CLISP for instance). These problems were reported by Tomas Hlavaty.

Getting further, the next error is:

;;; Compiling (DEFUN EVENT-STATISTICS ...).
;;; Error:
;;;   in file macros.lisp, position 41357
;;;   at (DEFUN EVENT-STATISTICS ...)
;;;   * The macro form (INFO V) was not expanded successfully.
;;; Error detected:
;;; Too few arguments supplied to a macro or a destructuring-bind form:
;;; (INFO V)
Condition of type: SIMPLE-ERROR
couldn't compile "src/compiler/macros.lisp"
Broken at SB-COLD::LOAD-OR-CLOAD-XCOMPILER. In: #<process TOP-LEVEL>.
 File: #P"/tmp/nix-build-sbcl-1.3.4.drv-1/sbcl-1.3.1/src/cold/defun-load-or-cload-xcompiler.lisp" (Position #974)

The info in macrolet has (&rest args) so "Too few arguments" error
should not happen.  There also exists a function info with three
arguments in the sbcl sources so it might be that it somehow clashes
with the macrolet info.  If I extract all relevant code for
event-statistics, it does compile without problems even if I define a
potentially "clashing" defun info with three args.  Not sure how to get
simpler testcase than compiling sbcl.