5.7.7.5 Og: Better Debugging Option

The -Og option disables optimizations that severely interfere with debugging, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience.

This option selects the best optimization level for the standard edit-compile-debug cycle. It enables all level 1 optimization flags except for those that may interfere with debugging, and those optimizations disabled cannot be re-enabled by their corresponding option. This level is a better choice than level 0 optimizations for producing debuggable code, because some compiler passes that collect debug information are disabled at level 0.