[Mono-bugs] [Bug 23547] Changed - Windening integers should clear high bits of the result

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
25 Apr 2002 03:15:41 -0000

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gonzalo@ximian.com.


--- shadow/23547	Wed Apr 24 22:23:33 2002
+++ shadow/23547.tmp.30515	Wed Apr 24 23:15:41 2002
@@ -53,6 +53,17 @@
 Always extends sign! It should not do that if a) the variable is
 unsigned, b) we are casting to an unsigned type.
+------- Additional Comments From gonzalo@ximian.com  2002-04-24 23:15 -------
+The C99 standard says:
+ [#3] The integer promotions are performed  on  each  of  the
+       operands.   The  type  of the result is that of the promoted
+       left operand.  If the value of the right operand is negative
+       or  is greater than or equal to the number of value and sign
+       bits in the  object  representation  of  the  promoted  left
+       operand, the behavior is undefined.