Activity log for bug #924276

Date Who What changed Old value New value Message
2012-01-31 13:01:45 Jan Moringen bug added bug
2012-01-31 13:02:15 Jan Moringen description A description of what you do, what happens, and what you expected to happen: When compiling a lambda containing an empty macrolet containing an ignorable declaration, the compiler produces a seemingly bogus style-warning which referes to the declaration. The compiler should not produce such bogus warnings. The warning disappears when the macrolet has one or more bindings. A complete repeatable test-case (also at http://paste.lisp.org/display/127388): * (compile nil `(lambda (a) (symbol-macrolet ((b 1)) (declare (ignorable a)) :c))) #<FUNCTION (LAMBDA (A)) {100DA7F9FB}> NIL NIL * (compile nil `(lambda (a) (symbol-macrolet () (declare (ignorable a)) :c))) ; in: LAMBDA (A) ; (IGNORABLE A) ; ; caught STYLE-WARNING: ; IGNORABLE declaration for an unknown variable: A ; (LAMBDA (A) ; (SYMBOL-MACROLET () ; (DECLARE (IGNORABLE A)) ; :C)) ; ; caught STYLE-WARNING: ; The variable A is defined but never used. ; ; compilation unit finished ; caught 2 STYLE-WARNING conditions #<FUNCTION (LAMBDA (A)) {100E6DB98B}> T NIL SBCL version as reported by "sbcl --version": SBCL 1.0.55 Output from uname -a: Linux azurit 2.6.35-30-generic #53-Ubuntu SMP Sun Jun 5 04:00:23 UTC 2011 x86_64 GNU/Linux *FEATURES*: (:SB-CORE-COMPRESSION :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS :IEEE-FLOATING-POINT :OS-PROVIDES-POLL :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-SUSECONDS-T :OS-PROVIDES-PUTWC :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :LITTLE-ENDIAN :MULTIPLY-HIGH-VOPS :MEMORY-BARRIER-VOPS :INLINE-CONSTANTS :FLOAT-EQL-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ALIEN-CALLBACKS :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS :STACK-ALLOCATABLE-CLOSURES :RAW-INSTANCE-INIT-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP :COMPARE-AND-SWAP-VOPS :LINKAGE-TABLE :C-STACK-IS-CONTROL-STACK :STACK-GROWS-DOWNWARD-NOT-UPWARD :GENCGC :LARGEFILE :SB-FUTEX :SB-THREAD :LINUX :ELF :UNIX :X86-64) A description of what you do, what happens, and what you expected to happen: When compiling a lambda containing an empty macrolet containing an ignorable declaration, the compiler produces a seemingly bogus style-warning which refers to the declaration. The compiler should not produce such bogus warnings. The warning disappears when the macrolet has one or more bindings. A complete repeatable test-case (also at http://paste.lisp.org/display/127388): * (compile nil `(lambda (a) (symbol-macrolet ((b 1))       (declare (ignorable a))       :c))) #<FUNCTION (LAMBDA (A)) {100DA7F9FB}> NIL NIL * (compile nil `(lambda (a) (symbol-macrolet ()       (declare (ignorable a))       :c))) ; in: LAMBDA (A) ; (IGNORABLE A) ; ; caught STYLE-WARNING: ; IGNORABLE declaration for an unknown variable: A ; (LAMBDA (A) ; (SYMBOL-MACROLET () ; (DECLARE (IGNORABLE A)) ; :C)) ; ; caught STYLE-WARNING: ; The variable A is defined but never used. ; ; compilation unit finished ; caught 2 STYLE-WARNING conditions #<FUNCTION (LAMBDA (A)) {100E6DB98B}> T NIL SBCL version as reported by "sbcl --version": SBCL 1.0.55 Output from uname -a: Linux azurit 2.6.35-30-generic #53-Ubuntu SMP Sun Jun 5 04:00:23 UTC 2011 x86_64 GNU/Linux *FEATURES*: (:SB-CORE-COMPRESSION :ANSI-CL :COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB  :SB-PACKAGE-LOCKS :SB-UNICODE :SB-EVAL :SB-SOURCE-LOCATIONS  :IEEE-FLOATING-POINT :OS-PROVIDES-POLL :OS-PROVIDES-GETPROTOBY-R  :OS-PROVIDES-SUSECONDS-T :OS-PROVIDES-PUTWC :OS-PROVIDES-DLADDR  :OS-PROVIDES-DLOPEN :LITTLE-ENDIAN :MULTIPLY-HIGH-VOPS :MEMORY-BARRIER-VOPS  :INLINE-CONSTANTS :FLOAT-EQL-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER  :ALIEN-CALLBACKS :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS  :STACK-ALLOCATABLE-VECTORS :STACK-ALLOCATABLE-CLOSURES :RAW-INSTANCE-INIT-VOPS  :UNWIND-TO-FRAME-AND-CALL-VOP :COMPARE-AND-SWAP-VOPS :LINKAGE-TABLE  :C-STACK-IS-CONTROL-STACK :STACK-GROWS-DOWNWARD-NOT-UPWARD :GENCGC :LARGEFILE  :SB-FUTEX :SB-THREAD :LINUX :ELF :UNIX :X86-64)
2012-01-31 20:00:39 Stas Boukarev sbcl: status New Invalid
2012-01-31 20:27:12 Christophe Rhodes summary Bogus style-warning caused by declarations within empty macrolet bogus lack of style warning with non-empty symbol-macrolet
2012-01-31 20:27:12 Christophe Rhodes sbcl: status Invalid Confirmed
2012-03-29 15:26:21 Nikodemus Siivola sbcl: importance Undecided Medium
2012-03-29 15:26:21 Nikodemus Siivola sbcl: status Confirmed In Progress
2012-03-29 15:26:21 Nikodemus Siivola sbcl: assignee Nikodemus Siivola (nikodemus)
2012-04-13 10:01:05 Nikodemus Siivola sbcl: status In Progress Fix Committed
2012-04-13 10:01:05 Nikodemus Siivola sbcl: assignee Nikodemus Siivola (nikodemus)
2012-05-21 05:45:32 Nikodemus Siivola sbcl: status Fix Committed Fix Released