Open kakra opened 4 years ago
Actually, I don't see why that is because -Werror
shouldn't depend on the optimization level. It's probably one of the optimization flags that will be enabled at -O1
(it working from level 1 up) but I wasn't able to pin-point which it is (despite comparing gcc -Q --help=optimizers -O...
. Maybe it's one of the machine flags. I don't know.
Bees should maybe add the missing gcc flag to successfully compile even without optimizers enabled.
Optimization eliminates unused code branches entirely, so GCC never gets to warn about their behavior. No warning, no error either.
That expression is trying to determine whether it's doing a signed-unsigned comparison when comparing values of the parameter types, and expects the overflow behavior that the warning is about. There's probably a better way to do that, but for now -Wno-error=sign-compare
will get the code building.
While testing some compile issues in Gentoo for v0.6.1, I found that bees won't compile with
-O0
even in current master: