Other solution, is to change NBFFIConst and be more forgiving about
constants range
(so if it sees large positive integer which don't fits into 32-bit signed
integer range, assume it is unsigned 32-but integer
and use proper immediate type during code generation).

I know this could be 'least surprising behavior' , only because this is how
C works by not caring about signed/unsigned value assignments.
But when i was doing it i decided to be more strict, because implicit
conversions have one big downside:
 - if there's a malfunction in your code, you often find yourself in a
position to wonder, whether it breaks because implicit conversion _applied_
in a place where you didn't expected or it is because it is _not applied_
in a place where you actually expected. :)


-- 
Best regards,
Igor Stasenko.

Reply via email to