Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: