From a237d7e039a923e109a4eefbd4e6a563a2ba0521 Mon Sep 17 00:00:00 2001 From: Alexey Dejneka Date: Fri, 25 Apr 2003 04:06:31 +0000 Subject: [PATCH] 0.pre8.102: Compiler issues a full WARNING on calling of an undefined function with a name from the CL package. --- NEWS | 2 ++ make-target-2.sh | 3 +++ src/compiler/main.lisp | 14 ++++++++++++-- version.lisp-expr | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7edf405..a409aff 100644 --- a/NEWS +++ b/NEWS @@ -1671,6 +1671,8 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 * fixed bug in MEMBER type: (MEMBER 0.0) is not the same as (SINGLE-FLOAT 0.0 0.0), because of the existence of -0.0 which is TYPEP the latter but not the former. + * compiler issues a full WARNING on calling of an undefined function + with a name from the CL package. * fixed some bugs revealed by Paul Dietz' test suite: ** COPY-ALIST now signals an error if its argument is a dotted list; diff --git a/make-target-2.sh b/make-target-2.sh index bcfef1b..507ddf0 100644 --- a/make-target-2.sh +++ b/make-target-2.sh @@ -84,5 +84,8 @@ echo //doing warm init ;; not wanted by default after build is complete. (And if it's ;; wanted, it can easily be turned back on.) #+sb-show (setf sb-int:*/show* nil) + ;; The system is complete now, all standard functions are + ;; defined. + (setq sb-c::*flame-on-necessarily-undefined-function* t) (sb-ext:save-lisp-and-die "output/sbcl.core" :purify t) EOF diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index 41c49a1..8b63af8 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -30,6 +30,10 @@ *last-source-form* *last-format-string* *last-format-args* *last-message-count* *lexenv*)) +;;; Whether call of a function which cannot be defined causes a full +;;; warning. +(defvar *flame-on-necessarily-undefined-function* nil) + (defvar *check-consistency* nil) (defvar *all-components*) @@ -179,14 +183,20 @@ (warnings (undefined-warning-warnings undef)) (undefined-warning-count (undefined-warning-count undef))) (dolist (*compiler-error-context* warnings) - (compiler-style-warn "undefined ~(~A~): ~S" kind name)) + (if #-sb-xc-host (and (eq kind :function) + (symbolp name) ; FIXME: (SETF CL:fo) + (eq (symbol-package name) *cl-package*) + *flame-on-necessarily-undefined-function*) + #+sb-xc-host nil + (compiler-warn "undefined ~(~A~): ~S" kind name) + (compiler-style-warn "undefined ~(~A~): ~S" kind name))) (let ((warn-count (length warnings))) (when (and warnings (> undefined-warning-count warn-count)) (let ((more (- undefined-warning-count warn-count))) (compiler-style-warn "~W more use~:P of undefined ~(~A~) ~S" more kind name)))))) - + (dolist (kind '(:variable :function :type)) (let ((summary (mapcar #'undefined-warning-name (remove kind undefs :test-not #'eq diff --git a/version.lisp-expr b/version.lisp-expr index 6289e59..eb3e298 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".) -"0.pre8.101" +"0.pre8.102" -- 1.7.10.4