Conformance issue: COMPILER-MACRO-FUNCTION
Describe the bug
While it is documented that "if the name is ... declared NOTINLINE, NIL is returned" from the compiler-macro-function
, it would seem that it is violates the standard.
The hyperspec page for notinline declaration says that
a notinline declaration prevents that compiler macro from being used
But doesn't says that it shadows the compiler macro. So the function name that was declared notinline still should be naming both a function and a compiler macro; and thus compiler-macro-function
should not return nil, as per entry for compiler-macro-function:
A value of nil denotes the absence of a compiler macro function named name.
To Reproduce
(defun foo ())
; => FOO
(define-compiler-macro foo ())
; => FOO
(declaim (notinline foo))
; => NIL
(compiler-macro-function 'foo)
; => NIL
Expected behavior
The call to compiler-macro-function
should have returned a function.
Desktop (please complete the following information):
- OS: Linux
- Version: 21e
Additional context
This change was introduced in commit e6999217 while fixing issue #3 (closed)
This causes an issue in alexandria's tests: alexandria/alexandria#37
SBCL, CCL, Allegro CL, ECL, CLASP, ABCL, CLISP and LispWorks all return a function in this case.
CLHS links: http://www.lispworks.com/documentation/HyperSpec/Body/f_cmp_ma.htm#compiler-macro-function http://www.lispworks.com/documentation/HyperSpec/Body/d_inline.htm#notinline