Opened 4 years ago
Last modified 3 years ago
#487 new defect
Compiler macro called for functions declared NOTINLINE
| Reported by: | Eric Timmons | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.9.2 | 
| Component: | compiler | Version: | 1.8.1-dev | 
| Keywords: | Cc: | ||
| Parent Tickets: | 
Description
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.
Note: See
        TracTickets for help on using
        tickets.
    
