0.7.7.4:
[sbcl.git] / src / compiler / ctype.lisp
index 34d69f0..3fb91d1 100644 (file)
                   (dolist (ref (leaf-refs var))
                     (derive-node-type ref type)))))
          t))))))
+
+(defun check-catch-tag-type (tag)
+  (declare (type continuation tag))
+  (let ((ctype (continuation-type tag)))
+    (when (csubtypep ctype (specifier-type '(or number character)))
+      (compiler-style-warn "~@<using ~S of type ~S as a catch tag (which ~
+                            tends to be unportable because THROW and CATCH ~
+                            use EQ comparison)~@:>"
+                          (continuation-source tag)
+                          (type-specifier (continuation-type tag))))))