On 09/23/2013 08:38 PM, Dave Allured - NOAA Affiliate wrote: > I believe the CPU overflow flag is updated after most integer > arithmetic instructions. Does GCC have any facility for checking this > flag after each integer operation? This would be a runtime check, of > course, not a compile time check. It wouldn't help with optimized code. GCC reorganizes code, and it assumes that overflow doesn't happen. GCC inserts some arithmetic instructions while optimizing and deletes others. So, even if an overflow happens in your code, it doesn't necessarily happen at runtime. Andrew.