>>>>> "dvl" == Didier Verna <[EMAIL PROTECTED]> writes:
dvl> Raymond Toy <[EMAIL PROTECTED]> wrote:
>> Could you send the macroexpansion you get for dotimes i? Or tell us what
>> version of cmucl you are using?
CL-USER> (lisp-implementation-type)
dvl> "CMU Common Lisp"
CL-USER> (lisp-implementation-version)
dvl> "CVS 19c 19c-release-patch-1 + minimal debian patches (19C)"
CL-USER>
dvl> The macro-expansion of the following dotimes call:
dvl> (dotimes (i 100)
dvl> (declare (type fixnum i))
dvl> (stuff))
dvl> gives this:
[snip]
Ok, you don't have the snapshots which use a gensym'ed counter. In
this particular case, I think the compiler knows i is of type (integer
0 100), and the additional fixnum declaration doesn't change that.
>> Perhaps the compiler is able to determine J is a fixnum because of the
aref
>> operation. I'd have to dig deep into the compiler to figure out what's
>> happening here.
dvl> OK. Thanks.
which is not to say that I actually will dig into the compiler to find
out why no warning is given. If, however, you come up with a case
where there are no warnings for J and bignum arithmetic is actually
used for J, then we have something to look into. :-) As it is now,
fixnum arithmetic is (correctly) used for J, so no warnings are
generated.
Ray