Commit ff1a711c authored by Tsukasa OMOTO's avatar Tsukasa OMOTO Committed by Guolin Ke
Browse files

Fix undefined behavior for right-shift(#531)

The result of a right-shift of a signed negative number is
implementation-dependent.
cf. https://msdn.microsoft.com/en-us//library/336xbhcz.aspx

Fix #519
Fix #521
parent 353286a8
...@@ -103,7 +103,7 @@ private: ...@@ -103,7 +103,7 @@ private:
return x & 0x7FFFFFF; return x & 0x7FFFFFF;
} }
int x = 123456789; unsigned int x = 123456789;
}; };
......
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