Changeset 8861


Ignore:
Timestamp:
Mar 22, 2008, 4:51:25 AM (11 years ago)
Author:
gb
Message:

Don't merge compiler warnings with info in the CDR of their ARGS slot.

Format some warnings a little differently.

File:
1 edited

Legend:

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

    r8754 r8861  
    425425       ,@body))))
    426426
     427;;; If warnings have more than a single entry on their
     428;;; args slot, don't merge them.
    427429(defun merge-compiler-warnings (old-warnings)
    428430  (let ((warnings nil))
    429431    (dolist (w old-warnings)
    430       (if
    431         (dolist (w1 warnings t)
    432           (let ((w1-args (compiler-warning-args w1)))
    433             (when (and (eq (compiler-warning-warning-type w)
    434                            (compiler-warning-warning-type w1))
    435                        w1-args
    436                        (eq (%car (compiler-warning-args w))
    437                            (%car w1-args)))
    438               (incf (compiler-warning-nrefs w1))
    439               (return))))
    440          (push w warnings)))
     432      (let* ((w-args (compiler-warning-args w)))
     433        (if
     434          (or (cdr w-args)
     435              (dolist (w1 warnings t)
     436                (let ((w1-args (compiler-warning-args w1)))
     437                  (when (and (eq (compiler-warning-warning-type w)
     438                                 (compiler-warning-warning-type w1))
     439                             w1-args
     440                             (null (cdr w1-args))
     441                             (eq (%car w-args)
     442                                 (%car w1-args)))
     443                    (incf (compiler-warning-nrefs w1))
     444                    (return)))))
     445          (push w warnings))))
    441446    warnings))
    442447
     
    482487    (format stream
    483488            (ecase (compiler-warning-warning-type condition)       
    484               (:global-mismatch "the current global definition of ~s.")
    485               (:environment-mismatch "the definition of ~s visible in the current compilation unit.")
     489              (:global-mismatch "the current global definition of ~s")
     490              (:environment-mismatch "the definition of ~s visible in the current compilation unit")
    486491              (:lexical-mismatch "the lexically visible definition of ~s"))
    487492            callee)))
     
    504509    (:special-fbinding . "Attempt to bind compiler special name: ~s. Result undefined")
    505510    (:lambda . "Suspicious lambda-list: ~s")
    506     (:result-ignored . "Function result ignored in call to ~s.")))
     511    (:result-ignored . "Function result ignored in call to ~s")))
    507512
    508513(defun report-compiler-warning (condition stream)
     
    515520      (apply #'format stream format-string (compiler-warning-args condition))
    516521      (funcall format-string condition stream))
     522    (format stream ".")
    517523    (let ((nrefs (compiler-warning-nrefs condition)))
    518524      (when (and nrefs (neq nrefs 1))
Note: See TracChangeset for help on using the changeset viewer.