Style warning from inline function defined within macrolet

Bug #524707 reported by Stephen Bach on 2010-02-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I'm seeing what appears to be a specious style warning from
SBCL-generated code:

; compiling (DEFUN SOME-FUNCTION ...); in: LAMBDA NIL
; (DEFUN ,NAME # NIL)))))
; The variable #:ENVIRONMENT613 is defined but never used.

A small test case is attached:

  1. definition.lisp defines a simple macrolet to wrap DEFUN with inline
     declarations and expands it once for a sample function.
  2. call.lisp defines a minimal function which calls the function from
  3. loader.lisp interprets definition.lisp and then compiles call.lisp,
     resulting in the above style-warning.

Removing the inlining declarations prevents the style warning. Tested
on SBCL 1.0.35 and a few older versions.

$ uname -a

2.6.26-2-amd64 #1 SMP Tue Jan 12 22:12:20 UTC 2010 x86_64 GNU/Linux

Nikodemus Siivola (nikodemus) wrote :

This is due to FUNCTION-LAMBDA-EXPRESSION not dealing correctly with declarations in inlined functions. Attached patch fixes this, committing after freeze.

Changed in sbcl:
status: New → In Progress
importance: Undecided → High

 status fixcommitted


Changed in sbcl:
status: In Progress → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers