From a339d8610329763e596d0dcbadbb3aee8dd10afb Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 20 Sep 2010 08:24:50 +0000 Subject: [PATCH] 1.0.42.48: more contextual CAREFUL-EXPAND-MACRO messages Differentiate between compiler-macroexpansion and macroexpansion in the warning messages. --- src/compiler/ir1tran.lisp | 9 +++++---- version.lisp-expr | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 7810dae..fb974ef 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -702,7 +702,7 @@ ;; CLHS 3.2.2.1.3 specifies that NOTINLINE ;; suppresses compiler-macros. (not (fun-lexically-notinline-p cmacro-fun-name))) - (let ((res (careful-expand-macro cmacro-fun form))) + (let ((res (careful-expand-macro cmacro-fun form t))) (cond ((eq res form) (ir1-convert-common-functoid start next result form op)) (t @@ -763,7 +763,7 @@ ;;; Expand FORM using the macro whose MACRO-FUNCTION is FUN, trapping ;;; errors which occur during the macroexpansion. -(defun careful-expand-macro (fun form) +(defun careful-expand-macro (fun form &optional cmacro) (let (;; a hint I (WHN) wish I'd known earlier (hint "(hint: For more precise location, try *BREAK-ON-SIGNALS*.)")) (flet (;; Return a string to use as a prefix in error reporting, @@ -775,10 +775,11 @@ (*print-level* 3)) (format nil - #-sb-xc-host "(in macroexpansion of ~S)" + #-sb-xc-host "(in ~A of ~S)" ;; longer message to avoid ambiguity "Was it the xc host ;; or the cross-compiler which encountered the problem?" - #+sb-xc-host "(in cross-compiler macroexpansion of ~S)" + #+sb-xc-host "(in cross-compiler ~A of ~S)" + (if cmacro "compiler-macroexpansion" "macroexpansion") form)))) (handler-bind ((style-warning (lambda (c) (compiler-style-warn diff --git a/version.lisp-expr b/version.lisp-expr index bc23034..28d864a 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.42.47" +"1.0.42.48" -- 1.7.10.4