On Monday, 5 February 2018 at 21:38:23 UTC, Simen Kjærås wrote:
If you were negating a byte, the code does have compile-time known values, since there's a limit to what you can stuff into a byte. If you weren't, the warning is warranted. I will admit the case of -(-128) could throw it off, though.

D has modular arithmetics across the board so there is no limit to what you can stuff into a byte or int.

But doing all calculations as int instead of byte prevents SIMD optimizations.

Reply via email to