title: In C++, what happens when I use static_cast<char> on an integer value outside -128,127 range?
body: <p>In a code compiled on i386 Linux using g++, I have used <code>static_cast&lt;char&gt;()</code> cast on a value that might exceed the valid range of -128,127 for a <code>char</code>. There were no errors or exceptions and so I used the code in production.</p>
  
  <p>The problem is now I don't know how this code might behave when a value outside this range is thrown at it. There is no problem if data is modified or truncated, I only need to know how this modification behaves on this particular platform.</p>
  
  <p>Also what would happen if C-style cast (<code>(char)value</code>) had been used? would it behave differently?</p>