August 09, 2020 [Issue 2809] Wrong constant folding for unsigned shift | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=2809 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla@digitalmars.com Resolution|--- |INVALID --- Comment #8 from Walter Bright <bugzilla@digitalmars.com> --- Since operands always undergo integral promotions, this behavior is expected and correct. The idea is that the expressions will compute the same value as the equivalent C expression in order to enable simple conversion of C code to D code. See: https://dlang.org/spec/type.html#integer-promotions https://dlang.org/spec/type.html#usual-arithmetic-conversions -- |
Copyright © 1999-2021 by the D Language Foundation