Hacker News new | ask | show | jobs
by mperham 491 days ago
Yep, I was hoping to learn how to do this. Seems like a much better long term lesson.
1 comments

For gcc: #pragma GCC optimize ("O0")

For clang: #pragma clang optimize off

For MSVC: #pragma optimize("", off)

Put one of these at the top of your source file.

Generally people want the opposite here: raising the optimization level for some code rather than turning it off for everything.