On May 10, 2014, at 12:11 PM, Richard Sandiford <rdsandif...@googlemail.com> wrote: > The new conversion can't be right because it loses overflow information. > The question then is whether this function should be prepared to handle > mismatched arguments (as the pre-wide-int version effectively did, since > it did everything in double_int precision) or whether the operation > should be strictly typed. If the former then the function should be > doing the calculation in widest_int, which would make it a much more > direct analogue of the original code. If the latter then we should be > able to operate directly on arg2.
I think I caused this, but I don’t think I had a deep reason for doing it, just trying to bring them to a common type. I think a fold person should weigh in. > I tried making int_const_binop_1 strictly typed and the only thing > that was needed to pass bootstrap was a fairly obvious-looking patch > to the Ada frontend. But there's quite a bit of fallout in the testsuite > itself (including the above). > This patch therefore uses wi:: directly. > I think this is worth doing independently of the eventual patches to fix > the type incompatibilities elsewhere. I think that seems fine. > OK to install? Ok.