X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=BUGS;h=fb6a1433e1b49ff4978db02d97fc6175b9989355;hb=18d4de696bc5063aad026ba62be613c7b07f5fc8;hp=fb0ced3362a4e9017dc0a1ba179d7f83cbe54cde;hpb=0dea4acb4216f9ee1182a6dc49483ec8d42babc5;p=sbcl.git diff --git a/BUGS b/BUGS index fb0ced3..fb6a143 100644 --- a/BUGS +++ b/BUGS @@ -1070,11 +1070,33 @@ Error in function C::GET-LAMBDA-TO-COMPILE: internal error, failed AVER: "(COMMON-LISP:EQ (SB!C::TN-ENVIRONMENT SB!C:TN) SB!C::TN-ENV)" -116: - The error message from compiling - (LAMBDA (X) (LET ((NIL 1)) X)) - is - +117: + When the compiler inline expands functions, it may be that different + kinds of return values are generated from different code branches. + E.g. an inline expansion of POSITION generates integer results + from one branch, and NIL results from another. When that inline + expansion is used in a context where only one of those results + is acceptable, e.g. + (defun foo (x) + (aref *a1* (position x *a2*))) + and the compiler can't prove that the unacceptable branch is + never taken, then bogus type mismatch warnings can be generated. + If you need to suppress the type mismatch warnings, you can + suppress the inline expansion, + (defun foo (x) + #+sbcl (declare (notinline position)) ; to suppress bug 117 bogowarnings + (aref *a1* (position x *a2*))) + or, sometimes, suppress them by declaring the result to be of an + appropriate type, + (defun foo (x) + (aref *a1* (the integer (position x *a2*)))) + + This is not a new compiler problem in 0.7.0, but the new compiler + transforms for FIND, POSITION, FIND-IF, and POSITION-IF make it + more conspicuous. If you don't need performance from these functions, + and the bogus warnings are a nuisance for you, you can return to + your pre-0.7.0 state of grace with + #+sbcl (declaim (notinline find position find-if position-if)) ; bug 117.. KNOWN BUGS RELATED TO THE IR1 INTERPRETER