r/shittyprogramming • u/fb39ca4 • Nov 21 '19
I compiled my code with -funsafe-math-optimizations and now it gives incorrect results
What happened? Those optimizations were supposed to be fun and safe!
182
Upvotes
50
u/diogenes08 Nov 21 '19
Looks to me like it's f'in unsafe.
28
u/redstoneguy12 Nov 21 '19
The fun part is figuring out what the hell happened, the safe part is that it won't brick your computer (probably)
27
u/SantaCruzDad Nov 21 '19
You probably have a virus - re-format and re-install your OS (twice, just to be safe).
15
u/evilgwyn Nov 21 '19
I compiled my code with -Wall and it didn't build a wall! Sad
5
u/Reorax Nov 21 '19
Unsafe? More like funsafe!