[m-rev.] for review: string.between

Peter Wang novalazy at gmail.com
Fri Jun 17 11:06:57 AEST 2011


On 2011-06-16, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> On Fri, 10 Jun 2011, Peter Wang wrote:
> >tests/hard_coded/string_substring.m:
> >	Test both between and substring procedures.
> 
> This last test is now failing on goliath (Linux/x86_64).

Thanks.  As I wrote in the log message for the fix, this was due to
signed integer overflow having undefined behaviour in C.

The top of int.m technically warns about this, but it seems to me that
Mercury is conceding a lot to the C semantics here, unnecessarily.
We could just perform additions using unsigned integers to get modulo
arithmetic, which at least would be predictable.

Peter
--------------------------------------------------------------------------
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