Opened 5 years ago

Closed 5 years ago

#1291 closed defect (notabug)

make-load-form not used for structs

Reported by: heller2 Owned by:
Priority: normal Milestone:
Component: other Version: trunk
Keywords: Cc:


CCL doesn't seem to call the make-load-form method for NAME in this example:

(in-package cl-user)

(eval-when (:compile-toplevel :load-toplevel)
  (defparameter *names* (make-hash-table))
  (defstruct name sym)
  (defmethod make-load-form ((o name) &optional env)
    (declare (ignore env))
    (let ((sym (name-sym o)))
      (format *trace-output* "make-load-form for name called: ~s~%" sym)
      `(or (gethash ',sym *names*)
	   (error "Name not defined: ~s" ',sym)))))

'#.(make-name :sym 'some-undefined-name)

The output is

shell> ccl -e '(load (compile-file "x.lisp") :verbose t)'
;Loading #P"/tmp/x.lx32fsl"...
Welcome to Clozure Common Lisp Version 1.11-dev-r16447M-trunk  (Linuxx8632)!

CCL is developed and maintained by Clozure Associates. For more information
about CCL visit  To enquire about Clozure's Common Lisp
consulting services e-mail or visit


but I would expect that it prints something about make-load-form being called.

Change History (1)

comment:1 Changed 5 years ago by heller2

  • Resolution set to notabug
  • Status changed from new to closed

Sorry. Hadn't realized that the quoted constant is optimized away.

Note: See TracTickets for help on using tickets.