Commit Graph

1 Commits

Author SHA1 Message Date
Julien Fischer
8e66e5b075 Change the semantics of the int shift operations.
Change int.(<<) and int.(>>) to throw an exception if their second operand is
not in [0, bits_per_int).  This brings them into line with the other integer
types.

As a transitional measure, add new functions that provide the old semantics.

library/int.m:
    As above.

NEWS:
    Announce the above change.

    Include the fixed size integer types in the list of reserved type names.

tests/hard_coded/shift_test.m:
     Call the legacy versions of the int shift operations.

tests/hard_coded/bitwise_int.{m,exp}:
     A new test of bitwise operations for the int type.
     (XXX I will add a 32-bit expected output separately.)

tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
     Include the new test case.

     Do not warn about the use of the obsolete legacy shift operations.
2017-08-30 20:46:11 +10:00