3 ms·
That happens, but fortunately not often. Most problems show up in either optimized or unoptimized code. If it is in optimized code only it is a compiler bug (ra
by bluGill 7y ago
That happens, but fortunately not often. Most problems show up in either optimized or unoptimized code. If it is in optimized code only it is a compiler bug (rare but I have seen it) or a race condition that won't show up in the debugger either. (there are a few more choices but the above are the big ones in my experience)
- compiler-guy 7y agoIn optimized code, it is far more likely that one has a programming error in one's source code that an aggressive optimization revealed, rather than a bug in an industrial compiler. For example, an uninitialized variable that ends up sharing a memory location with some other variable whose life-time doesn't overlap in optimized mode rather than having its own memory location without optimization. That one is caught be a warning, but there are thousands of possible errors that can be exposed this way. Compilers have bugs all the time, but code in a write-test-debug-cycle typically has many more.
- ludamad 7y agoWhich is why equally aggressive debug checks are important