Opened 3 years ago

Last modified 21 months 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.

Change History (1)

comment:1 Changed 21 months ago by Mark Evenson

Milestone: 1.8.11.9.2
Note: See TracTickets for help on using tickets.