Changeset 15528


Ignore:
Timestamp:
Dec 11, 2012, 3:41:14 AM (7 years ago)
Author:
gb
Message:

Try to emit a clearer warning if a SPECIAL variable is declared IGNORE.
Fixes ticket:1035 in the trunk.

Location:
trunk/source/compiler
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nx-basic.lisp

    r15314 r15528  
    692692    (:unsure . "Nonspecific warning")
    693693    (:duplicate-binding . "Multiple bindings of ~S in ~A form")
    694     (:shadow-cl-package-definition . "Local function or macro name ~s shadows standard CL definition.")))
     694    (:shadow-cl-package-definition . "Local function or macro name ~s shadows standard CL definition.")
     695    (:special-ignore . "Variable ~S can't be declared SPECIAL and IGNOREd.")))
    695696
    696697(defun report-invalid-type-compiler-warning (condition stream)
  • trunk/source/compiler/nx.lisp

    r15526 r15528  
    293293    (:format-error . style-warning)
    294294    (:unused . style-warning)
    295     (:type-conflict . style-warning)))
     295    (:type-conflict . style-warning)
     296    (:special-ignore . style-warning)))
    296297
    297298
  • trunk/source/compiler/nx0.lisp

    r15526 r15528  
    10071007         (ignored (%ilogbitp $vbitignore bits))
    10081008         (ignoreunused (%ilogbitp $vbitignoreunused bits)))
    1009     (if (or special reffed closed)
    1010       (progn
    1011         (if ignored (nx1-whine :ignore sym))
    1012         (nx-set-var-bits var (%ilogand (nx-check-downward-vcell var bits) (%ilognot (%ilsl $vbitignore 1)))))
    1013       (progn
    1014         (if (and setqed ignored) (nx1-whine :ignore sym))
    1015         (or ignored ignoreunused
    1016             (progn (and (consp expansion) (eq (car expansion) :symbol-macro) (setq sym (list :symbol-macro sym))) (nx1-whine :unused sym)))
    1017         (when (eql 0 (logior (nx-var-root-nrefs var) (nx-var-root-nsetqs var)))
    1018           (nx-set-var-bits var (%ilogior (%ilsl $vbitignore 1) bits)))))))
     1009    (if (and special ignored)
     1010      (nx1-whine :special-ignore sym)
     1011      (if (or  reffed closed)
     1012        (progn
     1013          (if ignored (nx1-whine :ignore sym))
     1014          (nx-set-var-bits var (%ilogand (nx-check-downward-vcell var bits) (%ilognot (%ilsl $vbitignore 1)))))
     1015        (progn
     1016          (if (and setqed ignored) (nx1-whine :ignore sym))
     1017          (or ignored ignoreunused
     1018              (progn (and (consp expansion) (eq (car expansion) :symbol-macro) (setq sym (list :symbol-macro sym))) (nx1-whine :unused sym)))
     1019          (when (eql 0 (logior (nx-var-root-nrefs var) (nx-var-root-nsetqs var)))
     1020            (nx-set-var-bits var (%ilogior (%ilsl $vbitignore 1) bits))))))))
    10191021
    10201022; if an inherited var isn't setqed, it gets no vcell.  If it -is- setqed, but
Note: See TracChangeset for help on using the changeset viewer.