From 2fd33a557e9594a4c9f93d7a1db3e07f9c39ec1e Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Tue, 23 May 2006 20:35:01 +0000
Subject: [PATCH] Fix symbol-macrolet + declare ignore bug found by Pascal
 Costanza, cmucl-imp, 2006/05/20.  See Trac ticket #4.

---
 compiler/ir1tran.lisp | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/compiler/ir1tran.lisp b/compiler/ir1tran.lisp
index 0b3ca2bdc..63bef956f 100644
--- a/compiler/ir1tran.lisp
+++ b/compiler/ir1tran.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1tran.lisp,v 1.172 2005/05/06 16:42:38 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1tran.lisp,v 1.173 2006/05/23 20:35:01 rtoy Rel $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1311,7 +1311,14 @@
 	    (compiler-note "Ignoring free ignore declaration for ~S." name)
 	    (compiler-warning "Ignore declaration for unknown variable ~S."
 			      name)))
-       ((and (consp var) (consp (cdr var)) (eq (car var) 'macro))
+       ((and (consp var)
+	     (eq (car var) 'macro)
+	     ;; Var is '(macro foo). Why must foo be a cons?  This
+	     ;; causes (symbol-macrolet ((a 42)) (declare (ignorable
+	     ;; a)) ...) to get a type error from a test below because
+	     ;; var is '(macro . 42) in this case.
+	     #+nil
+	     (consp (cdr var)))
 	;; Just ignore the ignore decl.
 	)
        ((functional-p var)
-- 
GitLab