Is integer overflow undefined in inline x86 assembly? : <p>Say I have the following C code:</p>

<pre><code>int32_t foo(int32_t x) {
    return x + 1;
}
</code></pre>

<p>This is undefined behavior when <code>x == INT_MAX</code>. Now say I performed the addition with inline assembly instead:</p>

<pre><code>int32_t foo(int32_t x) {
    asm("incl %0" : "+g"(x));
    return x;
}
</code></pre>

<p>Question: Does the inline assembly version still invoke undefined behavior when <code>x == INT_MAX</code>? Or does undefined behavior only apply to the C code?</p>
