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

That is only possible if the optimization is wrong (rare), or the program already had undefined behavior (very common, because undefined behavior is very easy to trigger in C).


I'll give an example: -ffast-math.

There's extensive literature out there on how fast-math changes the behaviour of code. I've been bitten by this a couple of times already.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: