News for hackers. Stuff that matters.
Re:“Modern” C++ Lamentations by snovv_crash on Friday December 28, 2018 @02:53PM (#18778992)
This is what RelWithDebInfo builds are for.

Don't make my Debug build into a RelWithDebInfo build or it makes it a huge pain to track down subtle bugs/errors in non-performance-critical unit tests.

Re:“Modern” C++ Lamentations by tom_ on Friday December 28, 2018 @04:41PM (#18779670)
This is dealt with in the article - debugging optimised code is a pain, even when you know what you're doing. The source-level debugging often doesn't work, variable watches often don't work (and this even though DWARF has a whole pile of features specifically so that this stuff can work...), and debugging at the assembly language level is a chore.
Re:“Modern” C++ Lamentations by fanf2 on Friday December 28, 2018 @06:17PM (#18780283)
gcc has -Og (optimize without harming debugging) which is supposed to avoid these problems