From 4e44dc2d06355a61ec2b259e90145dee8cfca549 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 10 Jun 2015 18:16:47 -0700 Subject: Make INT32_MIN % -1 defined again. --- AstSemantics.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'AstSemantics.md') diff --git a/AstSemantics.md b/AstSemantics.md index 8e6a9bd..738f8c6 100644 --- a/AstSemantics.md +++ b/AstSemantics.md @@ -308,8 +308,9 @@ and 0 representing false. * Int32Ule - unsigned less than or equal Division or remainder by zero traps. -Signed division overflow (`INT32_MIN / -1`) and the corresponding signed -remainder operation (`INT32_MIN % -1`) trap. +Signed division overflow (`INT32_MIN / -1`) traps. Signed remainder with a +non-zero denominator always returns the correct value, even when the +corresponding division would trap. Shifts interpret their shift count operand as an unsigned value. When the shift count is at least the bitwidth of the shift, Shl and Shr return 0, -- cgit v1.2.3