Files
mercury/tests/hard_coded/char_signed.exp
Peter Wang ef4704b30a When a foreign_proc output variable of type `char' is assigned to an
Branches: main, 10.04

When a foreign_proc output variable of type `char' is assigned to an
MR_Word variable, it must first be cast to an MR_UnsignedChar to prevent
sign-extension of 8-bit character values.  This was documented in
mercury_string.h.

Fixes bug #158.

compiler/llds_out_instr.m:
        As above.

tests/hard_coded/Mmakefile:
tests/hard_coded/char_signed.exp:
tests/hard_coded/char_signed.m:
        Add test case.
2010-08-19 06:33:42 +00:00

5 lines
48 B
Plaintext

unify succeed
'A' < 0xFF
0xFF >= 'A'
'A' < 0xFF