declaiming FOO as NOTINLINABLE causes warning about non-toplevel FOO not being inlinable

Bug #963530 reported by Luís Oliveira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

In this test case, FOO is a non-toplevel function and it has been declared NOTINLINE. This declaration causes two unexpected compile notes about DEFUN FOO not being inlinable.

$ cat test.lisp
(in-package :cl-user)

(declaim (notinline foo))

(let ((i 0))
  (defun foo ()
    (incf i)))

$ sbcl
This is SBCL 1.0.54.62-9ef5527, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (compile-file "test.lisp")

; compiling file "/private/tmp/test.lisp" (written 23 MAR 2012 09:08:24 PM):
; compiling (IN-PACKAGE :CL-USER)
; compiling (DECLAIM (NOTINLINE FOO))
; compiling (LET (#) ...)
; file: /private/tmp/test.lisp
; in: LET ((I 0))
; (LET ((I 0))
; (DEFUN FOO () (INCF I)))
;
; note: lexical environment too hairy, can't inline DEFUN FOO

; in: DEFUN FOO
; (DEFUN FOO () (INCF I))
;
; note: lexical environment too hairy, can't inline DEFUN FOO
;
; compilation unit finished
; printed 2 notes

; /private/tmp/test.fasl written
; compilation finished in 0:00:00.055
#P"/private/tmp/test.fasl"
NIL
NIL
*

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.