From 5a1e9fb26baf0171327bd8814cb803d781c67107 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Mon, 7 Apr 2003 23:17:30 +0000 Subject: [PATCH] 0.pre8.45: new declarations-are-assertions bug in the compiler... ...new BUGS entry ...workaround for symptoms in OPEN and LOAD --- BUGS | 9 +++++++++ src/code/target-load.lisp | 1 + src/compiler/fndb.lisp | 13 +++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/BUGS b/BUGS index 607ff00..f43d6b2 100644 --- a/BUGS +++ b/BUGS @@ -1265,6 +1265,15 @@ WORKAROUND: ; caught STYLE-WARNING: ; The variable Y is defined but never used. +244: "optimizing away tests for &KEY args of type declared in DEFKNOWN" + (caught by clocc-ansi-test :EXCEPSIT-LEGACY-1050) + In sbcl-0.pre8.44, (OPEN "foo" :DIRECTION :INPUT :EXTERNAL-FORMAT 'FOO) + succeeds with no error (ignoring the bogus :EXTERNAL-FORMAT argument) + apparently because the test is optimized away. The problem doesn't + exist in sbcl-0.pre8.19. Deleting the (MEMBER :DEFAULT) declaration + for :EXTERNAL-FORMAT in DEFKNOWN OPEN (and LOAD) is a workaround for + the problem (and should be removed when the problem is fixed). + DEFUNCT CATEGORIES OF BUGS IR1-#: These labels were used for bugs related to the old IR1 interpreter. diff --git a/src/code/target-load.lisp b/src/code/target-load.lisp index d572053..b760221 100644 --- a/src/code/target-load.lisp +++ b/src/code/target-load.lisp @@ -153,6 +153,7 @@ #!+sb-doc "Load the file given by FILESPEC into the Lisp environment, returning T on success." + (unless (eq external-format :default) (error "Non-:DEFAULT EXTERNAL-FORMAT values are not supported.")) diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index daf551c..58e3c77 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1143,7 +1143,12 @@ :rename-and-delete :overwrite :append :supersede nil)) (:if-does-not-exist (member :error :create nil)) - (:external-format (member :default))) + (:external-format + ;; FIXME: This is logically (MEMBER :DEFAULT), + ;; but as a workaround for bug 244, we don't + ;; declare it (to keep the compiler from trusting + ;; the declaration unchecked). + t)) (or stream null)) (defknown rename-file (pathname-designator filename) @@ -1166,7 +1171,11 @@ (:verbose t) (:print t) (:if-does-not-exist (member :error :create nil)) - (:external-format (member :default))) + (:external-format + ;; FIXME: This is logically (MEMBER :DEFAULT), but as a workaround + ;; for bug 244, we don't declare it (to keep the compiler from + ;; trusting the declaration unchecked). + t)) t) (defknown directory (pathname-designator &key) -- 1.7.10.4