title: What is the difference between "undefined behaviour" and "implementation defined behaviour", or why even distinguish between them?
body: <p>The C standard (AFAIK) uses both terms. I have trouble understanding where the difference between the two is.</p>
  
  <p>If I have any given, syntactically correct C statement, there can be no way that a compiler will not issue some machine instructions. Of course, it could choose to not issue any statement at all, but even that would be "implementation dependant".</p>
  
  <p>A more concrete example: Overflow of integer values. Now we have two types of overflow: arithmetic, and memory-wise. If the overflow of signed integers is UB according to the standard, what does that mean? Could an implementation simply spill an overflowing bit into the adjacent byte to the MSB? (Never seen that, but would it be ok?)</p>
  
  <p>It appears to me that "undefined behaviour" <strong>always</strong> is implementation dependant. Or, to put it differently, there seems no way a compiler could handle any "undefined behaviour" without introducing "implementation defined" behaviour.</p>
  
  <p>So why even distinguish between the two?</p>