Hi,
Occasionally, while debugging a GCC build, I run into “optimized out” parameters, which is annoying or sometimes hindering debugging.
Therefor I looked into the optimization setting applied during Debug build (using "-g"), and there’s none. Apparently, by default, this causes the GCC optimizer to ‘hide’ some of the information.
There is the flag “-Og” which prevents this behaviour, allowing parameters to remain, however, this exposes some more instances of suspected uninitialised variable use and clobbered variables.
I’ve managed to address these in master (MR !27457), so this branch is good to go.
Question is: should we add the setting of “-Og” to our non-MSVC debug build, in CMakeLists.txt. By the way, Clang does support the same flag, and I assume exposes the same behaviour, but I’ve not tested that.
Thanks,
Jaap