From 63bb1960bc28a88c75679dedf8aecfa3dc728070 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 3 Feb 2006 13:51:28 +0000
Subject: [PATCH] Don't declare the stream type so the etypecase can detect bad
 objects.  Gives a more useful report instead of segfaulting on x86/linux for
 something like (read (make-array 5)).

---
 code/sysmacs.lisp | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/code/sysmacs.lisp b/code/sysmacs.lisp
index 9ea3717bd..4f9fc0a61 100644
--- a/code/sysmacs.lisp
+++ b/code/sysmacs.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/code/sysmacs.lisp,v 1.29 2003/09/25 14:08:33 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sysmacs.lisp,v 1.30 2006/02/03 13:51:28 rtoy Rel $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -129,14 +129,13 @@ and also the CMUCL C runtime."
 
 ;;; Execute the appropriate code for each stream subtype
 (defmacro stream-dispatch (stream simple lisp &optional (gray nil gray-p))
-  `(locally (declare (type stream ,stream))
-     (etypecase ,stream
-       (lisp-stream
-	,lisp)
-       (stream:simple-stream
-	,simple)
-       (ext:fundamental-stream
-	,(if gray-p gray `(no-gray-streams ,stream))))))
+  `(etypecase ,stream
+     (lisp-stream
+      ,lisp)
+     (stream:simple-stream
+      ,simple)
+     (ext:fundamental-stream
+      ,(if gray-p gray `(no-gray-streams ,stream)))))
 
 
 ;;;; These are hacks to make the reader win.
-- 
GitLab