SBCL to wager that this (undefined in ANSI) operation would be safe.
3:
+ a:
ANSI specifies that a type mismatch in a structure slot
initialization value should not cause a warning.
WORKAROUND:
Such code should compile without complaint and work correctly either
on SBCL or on any other completely compliant Common Lisp system.
+ b: &AUX argument in a boa-constructor without a default value means
+ "do not initilize this slot" and does not cause type error. But
+ an error may be signalled at read time and it would be good if
+ SBCL did it.
+
6:
bogus warnings about undefined functions for magic functions like
SB!C::%%DEFUN and SB!C::%DEFCONSTANT when cross-compiling files
then requesting a BACKTRACE at the debugger prompt gives no information
about where in the user program the problem occurred.
-62:
- The compiler is supposed to do type inference well enough that
- the declaration in
- (TYPECASE X
- ((SIMPLE-ARRAY SINGLE-FLOAT)
- (LOCALLY
- (DECLARE (TYPE (SIMPLE-ARRAY SINGLE-FLOAT) X))
- ..))
- ..)
- is redundant. However, as reported by Juan Jose Garcia Ripoll for
- CMU CL, it sometimes doesn't. Adding declarations is a pretty good
- workaround for the problem for now, but can't be done by the TYPECASE
- macros themselves, since it's too hard for the macro to detect
- assignments to the variable within the clause.
- Note: The compiler *is* smart enough to do the type inference in
- many cases. This case, derived from a couple of MACROEXPAND-1
- calls on Ripoll's original test case,
- (DEFUN NEGMAT (A)
- (DECLARE (OPTIMIZE SPEED (SAFETY 0)))
- (COND ((TYPEP A '(SIMPLE-ARRAY SINGLE-FLOAT)) NIL
- (LET ((LENGTH (ARRAY-TOTAL-SIZE A)))
- (LET ((I 0) (G2554 LENGTH))
- (DECLARE (TYPE REAL G2554) (TYPE REAL I))
- (TAGBODY
- SB-LOOP::NEXT-LOOP
- (WHEN (>= I G2554) (GO SB-LOOP::END-LOOP))
- (SETF (ROW-MAJOR-AREF A I) (- (ROW-MAJOR-AREF A I)))
- (GO SB-LOOP::NEXT-LOOP)
- SB-LOOP::END-LOOP))))))
- demonstrates the problem; but the problem goes away if the TAGBODY
- and GO forms are removed (leaving the SETF in ordinary, non-looping
- code), or if the TAGBODY and GO forms are retained, but the
- assigned value becomes 0.0 instead of (- (ROW-MAJOR-AREF A I)).
-
63:
Paul Werkowski wrote on cmucl-imp@cons.org 2000-11-15
I am looking into this problem that showed up on the cmucl-help
(see bug 203)
+ c. (defun foo (x y)
+ (locally (declare (type fixnum x y))
+ (+ x (* 2 y))))
+ (foo 1.1 2) => 5.1
+
194: "no error from (THE REAL '(1 2 3)) in some cases"
fixed parts:
a. In sbcl-0.7.7.9,
229:
(subtypep 'function '(function)) => nil, t.
-230:
- (fixed in 0.7.10.5)
+233: bugs in constraint propagation
+ a.
+ (defun foo (x)
+ (declare (optimize (speed 2) (safety 3)))
+ (let ((y 0d0))
+ (values
+ (the double-float x)
+ (setq y (+ x 1d0))
+ (setq x 3d0)
+ (quux y (+ y 2d0) (* y 3d0)))))
+ (foo 4) => segmentation violation
+
+ (see usage of CONTINUATION-ASSERTED-TYPE in USE-RESULT-CONSTRAINTS)
+
+ b.
+ (declaim (optimize (speed 2) (safety 3)))
+ (defun foo (x y)
+ (if (typep (prog1 x (setq x y)) 'double-float)
+ (+ x 1d0)
+ (+ x 2)))
+ (foo 1d0 5) => segmentation violation
+
+234:
+ (fixed in sbcl-0.7.10.36)
DEFUNCT CATEGORIES OF BUGS
IR1-#: