[Ecls-list] About type propagation...

Tobias C. Rittweiler tcr at freebits.de
Wed Aug 5 06:41:45 UTC 2009

Juan Jose Garcia-Ripoll writes:

> Take for instance, Maxima, which was calling, on one branch of code
> (CAR (LOGIOR ...)), for instance, or flexi-streams, which has the
> equivalent of (CODE-CHAR (IF (SOMETHING) (expression generating an
> integer ...) NIL)) (I am oversimplifying a complicated expression).
> Somehow Maxima works because that code branch is never executed
> (nobody actually knows what it is for), but the funny thing is that in
> flexi-stream there is an implicit assumption that given the invariants
> of the program the invalid branch will never be executed, so that the
> "practical" type of the expression is INT

It's a bit suspicious. Did you try SBCL on it? Doesn't it signal a
warning in this case? (For (CHAR-CODE (WHEN (ODDP X) #\X)) it does.)

It's suspicious because if it _does_ signal a warning, trying to build
flexi-streams with SBCL+ASDF will fail, because on SBCL an asdf build
will stop on warnings. And this would probably have been fixed already.


More information about the ecl-devel mailing list