On Thu, 5 Apr 2001, Christoph Reichenbach wrote:

> >                         s->acc =
> > GET_HEAP(s->execution_stack[s->execution_stack_pos].pc);
> > vm.c  374  Info 734: Loss of precision (assignment) (31 bits to 15 bits)
>
> This is a selector read operation; SCI is a 16 bit VM (and we're doing a signed
> read here, so I guess that's what it means by 15 bits), so we don't need the
> extra sign bits anyway.

> >       s->acc = ((guint16) POP()) >> s->acc;
> > vm.c  576  Info 734: Loss of precision (assignment) (16 bits to 15 bits)
>
> That one definitely works...

okay, thanks for the explanation. Would other conversions to 15 bits
possibly cause problems? For instance, something being put on the stack
beyond 32k (via 16-bit variable) and then not being able to be accessed by
a 15-bit variable? Or, not enough stack space appearing to be present,
causing an overflow?

If not, I won't report things loss of precision warnings that look like
this. If it's a possibility, then I'll continue. :)



--
http://www.clock.org/~matt


Reply via email to