Commit 1fa4a563 authored by simonmar's avatar simonmar
Browse files

[project @ 1999-12-13 16:10:56 by simonmar]

Correct off-by-one error in bounds checking when converting
NoRepIntegers into the real thing.  Not a bug, just a cleanup.
parent b90964e2
......@@ -515,8 +515,8 @@ otherwise, wrap with @addr2Integer@.
litToRep (NoRepInteger i integer_ty)
= returnPM (integer_ty, rhs)
where
rhs | i > tARGET_MIN_INT && -- Small enough, so start from an Int
i < tARGET_MAX_INT
rhs | i >= tARGET_MIN_INT && -- Small enough, so start from an Int
i <= tARGET_MAX_INT
= Con (DataCon smallIntegerDataCon) [Con (Literal (mkMachInt i)) []]
| otherwise -- Big, so start from a string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment