News for hackers. Stuff that matters.
Re:C++ Insights – See your source code with the eyes of a co... by otabdeveloper4 on Saturday April 06, 2024 @10:19AM (#39952633)
Extremely bad advice. There is no point in debugging something that bears no relation to the software you release, and compiler optimizations is the only reason to use C or C++ in the first place.
Re:C++ Insights – See your source code with the eyes of a co... by CyberDildonics on Saturday April 06, 2024 @11:04AM (#39952968)
It's extremely good advice. Debugging is all about simplifying things and finding the problem. If you do that without optimizations first, you can deal with your program without optimizations first. Once that is set, then you can deal with any differences due to optimizations, which should be extremely rare, because that would be a bug anyway.

Mixing two sources of complexity is extremely bad advice.

Re:C++ Insights – See your source code with the eyes of a co... by flohofwoe on Saturday April 06, 2024 @12:53PM (#39953650)
Optimizations usually don't change the behaviour of a program (unless you hit UB, but that's what UBSan is for).