From: Nikodemus Siivola Date: Fri, 12 Mar 2010 11:23:09 +0000 (+0000) Subject: 1.0.36.22: bogus style-warning in DEFSTRUCT edge-case X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=6554859e4423fbf007452160d86520d056b88c6d;p=sbcl.git 1.0.36.22: bogus style-warning in DEFSTRUCT edge-case * Using initformless &AUX to specify uninitialized structure slots caused a bogus style-warning. Patch by: Adlai Chandrasekhar Fixed launchpad bug #528807. --- diff --git a/NEWS b/NEWS index b85c0c0..cb5bb9b 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,8 @@ changes relative to sbcl-1.0.36: SB-EXT:RESTRICT-COMPILER-POLICY into account. (lp#313337) * bug fix: Comma inside a backquoted array or structure resulted in nonsense values instead of signaling an error. (lp#309093) + * bug fix: Spurious unused variale warning in a DEFSTRUCT edge case. + (lp#528807) changes in sbcl-1.0.36 relative to sbcl-1.0.35: * new feature: SB-EXT:TYPEXPAND-1, SB-EXT:TYPEXPAND, and diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index a7dfff4..76f3c83 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -1535,12 +1535,12 @@ (when auxp (arglist '&aux) (dolist (arg aux) - (arglist arg) (if (proper-list-of-length-p arg 2) - (let ((var (first arg))) - (vars var) - (types (get-slot var))) - (skipped-vars (if (consp arg) (first arg) arg)))))) + (let ((var (first arg))) + (arglist arg) + (vars var) + (types (get-slot var))) + (skipped-vars (if (consp arg) (first arg) arg)))))) (funcall creator defstruct (first boa) (arglist) (vars) (types) diff --git a/tests/defstruct.impure.lisp b/tests/defstruct.impure.lisp index 7f2ba08..e84e4f3 100644 --- a/tests/defstruct.impure.lisp +++ b/tests/defstruct.impure.lisp @@ -1065,3 +1065,9 @@ redefinition." (with-test (:name defstruct-copier-typechecks-argument) (assert (not (raises-error? (copy-person (make-astronaut :name "Neil"))))) (assert (raises-error? (copy-astronaut (make-person :name "Fred"))))) + +(with-test (:name :bug-528807) + (let ((*evaluator-mode* :compile)) + (handler-bind ((style-warning #'error)) + (eval `(defstruct (bug-528807 (:constructor make-528807 (&aux x))) + (x nil :type fixnum)))))) diff --git a/version.lisp-expr b/version.lisp-expr index de81b35..6ef80a7 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.36.21" +"1.0.36.22"