Detecting arithmetic overflow in C with NASM
Wrong flag
I believe you should be looking at the overflow flag instead of the carry flag, since all of your operands are signed values.  On x86, the overflow flag is set if signed addition overflows.  The carry flag is set if unsigned addition overflows.
Not reliable
As @Edward pointed out, it doesn't seem reliable to use this kind of function because you never know how the compiler is going to rearrange your code.  Even without the compiler rearranging your code, the results could be confusing.  From your own example:
ret = a + a + b;
overflow = read_overflow_flag();

Here, you are only detecting overflow over the second of the two additions.  If the first addition overflowed but the second didn't, you wouldn't catch it.  In other words, the assembly might look like this:
add %ecx, %edx, %edx  // ret = a + a  &lt;- overflow not detected here
add %ecx, %ecx, %ebx  // ret = ret + b
seto %al              // overflow = overflow flag

To do it correctly, I would suggest you use a function that adds two numbers together and updates a cumulative overflow:
// If the add overflows, 1 will be added to *pOverflow.
int32_t add32_with_overflow(int32_t x, int32_t y, int *pOverflow);

int32_t ret      = 0;
int     overflow = 0;

ret = add32_with_overflow(a,   a, &amp;overflow);
ret = add32_with_overflow(ret, b, &amp;overflow);
printf(&quot;Overflow = %d\n&quot;, overflow);