3 ms·
In practice, I find I usually have to switch to -O0, as nearly all my variables are <optimized out> with -Og.
by slavik81 6y ago
In practice, I find I usually have to switch to -O0, as nearly all my variables are <optimized out> with -Og.
- pm215 6y agoThat's been my experience too. Unfortunately the gcc devs essentially poisoned their own well there -- I'm now much less likely to want to go back and try -Og because of my initial bad experience. If they'd started with "always good debug and very few optimisations" and only added in optimisations when they didn't break the debug illusion then the user-experience would have been much better (always at least as good as -O0 when debugging, and gradually gets faster as you use newer gcc versions).