From armedbear-devel at common-lisp.net Mon Nov 29 15:30:04 2021 From: armedbear-devel at common-lisp.net (armedbear) Date: Mon, 29 Nov 2021 15:30:04 -0000 Subject: [armedbear] #487: Compiler macro called for functions declared NOTINLINE Message-ID: <036.533994cd2cb035edb02f6ed0f238b013@common-lisp.net> #487: Compiler macro called for functions declared NOTINLINE -------------------------------+---------------------- Reporter: Eric Timmons | Type: defect Status: new | Priority: major Milestone: 1.8.1 | Component: compiler Version: 1.8.1-dev | Keywords: Parent Tickets: | -------------------------------+---------------------- According to 3.2.2.1.3, compiler macros must not be applied if the function is declared notinline. ABCL seems to call them anyways. To reproduce, compile the following: {{{ (in-package #:cl-user) (eval-when (:compile-toplevel :load-toplevel :execute) (declaim (inline explain)) (define-compiler-macro explain (&whole form &rest args) (declare (ignore args)) (warn "Compile macro called!") form) (defgeneric explain (operation component)) (defmethod explain ((o string) c) (declare (notinline explain)) (explain (find-class (read-from-string o)) c)) (defmethod explain ((o class) c) (format t "~S ~S~%" o c))) }}} I expect no warning. However, one is signaled. This is a reduction of something I noticed when prepping for the ASDF 3.4 series. It causes self upgrade to fail on ABCL. I tried writing a version with normal functions, but couldn't reproduce. So I don't know if I was just doing something wrong or if this only happens with generic functions. -- Ticket URL: armedbear armedbear