Annoyance with new integer promotion deprecations

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Feb 6 08:16:03 UTC 2018


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.



More information about the Digitalmars-d mailing list