gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rwxr-xr-xgcl/cmpnew/gcl_collectfn.lsp 14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcl/cmpnew/gcl_collectfn.lsp b/gcl/cmpnew/gcl_collectfn.lsp
index 584d7b9c0..3f9c7f087 100755
--- a/gcl/cmpnew/gcl_collectfn.lsp
+++ b/gcl/cmpnew/gcl_collectfn.lsp
@@ -238,6 +238,8 @@
(defvar *file-table* (make-hash-table :test 'eq))
+(defvar *warn-on-multiple-fn-definitions* t)
+
(defun add-fn-data (lis &aux tem file)
(let ((file (and (setq file (si::fp-input-stream *standard-input*))
(truename file))))
@@ -248,12 +250,12 @@
(namestring file))))
(setf (get (fn-name v) 'other-form) t)))
(setf (gethash (fn-name v) *call-table*) v)
- (if (setq tem (gethash (fn-name v) *file-table*))
- (or (equal tem file)
- (format t "~% Warn ~a redefined in ~a. Originally in ~a."
- (fn-name v) file tem)))
- (setf (gethash (fn-name v) *file-table*)
- file))))
+ (when *warn-on-multiple-fn-definitions*
+ (when (setq tem (gethash (fn-name v) *file-table*))
+ (unless (equal tem file)
+ (warn 'simple-warning :format-control "~% ~a redefined in ~a. Originally in ~a."
+ :format-arguments (list (fn-name v) file tem)))))
+ (setf (gethash (fn-name v) *file-table*) file))))
(defun dump-fn-data (&optional (file "fn-data.lsp")
&aux (*package* (find-package "COMPILER"))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月03日 03:02:55 +0000

AltStyle によって変換されたページ (->オリジナル) /