Hacker News new | ask | show | jobs
by mort96 878 days ago
What you really should enable is the fun and safe math optimizations, with -funsafe-math-optimizations.
2 comments

The problem is this causes the compiler to correctly solve your recreational math problems, which isn't actually a much fun as solving them yourself!
I know almost nothing about compiler flags but I got a laugh out of this even though I still don't know if you're joking or not. Edit: Just read it again and now I understand the joke. Haha
To others `-f` is a common prefix for GCC flags. You can think of this as "enable feature". So -funsafe-math-operations should be read as (-f) (unsafe-math-operations). Not (-)(funsafe-math-operations).
I kind of like the idea the flag is sarcastically calling them very fun and very safe.
don't forget libiberty which is linked in using -liberty (and freedom for all)
BTW that library was named by John Gilmore, who’s a pretty hardcore libertarian.
strangely I'm not aware of a libibre.
oh, that's called -lmojito