[m-rev.] for review: allow string.base_string_to_int to parse int.min_int literals

Ian MacLarty maclarty at csse.unimelb.edu.au
Thu Jan 14 09:30:52 AEDT 2010


On Thu, Jan 14, 2010 at 8:33 AM, Julien Fischer
<juliensf at csse.unimelb.edu.au> wrote:
>
> On Wed, 13 Jan 2010, Ian MacLarty wrote:
>
>> On Wed, Jan 13, 2010 at 4:58 PM, Ralph Becket <rafe at csse.unimelb.edu.au>
>> wrote:
>>>
>>> Ian MacLarty, Wednesday, 13 January 2010:
>>>>
>>>> Change string.base_string_to_int so that it doesn't fail if the base is
>>>> 10 and
>>>> the integer is int.min_int.  The previous behaviour seems unintuitive
>>>> and means
>>>> we can't use the literal -2147483648 in Mercury programs on 32 bit
>>>> machines,
>>>> even though that number can be represented in 32 bits.
>>>
>>> What about 64 bits?
>>
>> What about them?
>
> I think the intent of Ralph's question is: can you now use the literal
> -9223372036854775808 on 64-bit machines?

Yes, that should also now be possible, although I haven't tested that
case.  I'll test that before I commit, but I'm not sure if I could add
that test to the test suite so that it would also work on 32 bit
machines (?).

Ian.

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list