Hacker News new | past | comments | ask | show | jobs | submit login

-O0 doesn't change what the compiler code generation is allowed to do around UB. Optimizing tends to expose UB by producing undesired operation, but the optimizer is only allowed to make transformations that result in the code still complying with the standard. So code generation without the optimizer could still produce undesired operation, and turning the optimizer off is no guarantee that it'll do what you want.



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

Search: