From: Christophe R. <cs...@ca...> - 2005-11-01 07:14:18
|
Far=C3=A9 <fa...@gm...> writes: > I think that SBCL is wrong to issue a warning here (and thus bork file > compilation), but maybe you can explain me instead why I'm doing > something wrong... I don't think you're doing something wrong here. > * (let ((val "foobar")) > (map-into (make-array (list (length val)) :element-type '(unsigned-byte= 8)) > #'char-code val)) > > ; caught WARNING: > ; Asserted type ARRAY conflicts with derived type > ; (VALUES (SIMPLE-ARRAY (UNSIGNED-BYTE 8) (*)) &OPTIONAL). > ; See also: > ; The SBCL Manual, Node "Handling of Types" This warning is even more cryptic than usual. Although it /looks/ utterly nonsensical, the ARRAY it's complaining about is actually (AND ARRAY (NOT SIMPLE-ARRAY)) -- or in other words, something with a fill pointer. I suspect that (DEBUG 2) is confusing the flow analysis of the compiler, so that it fails to notice that one branch in the above case is unreachable. Cheers, Christophe |