Hacker News new | ask | show | jobs
by senkora 480 days ago
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.

1 comments

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