[Issue 2809] Wrong constant folding for unsigned shift

2020-08-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2809 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 2809] Wrong constant folding for unsigned shift

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 --- Comment #5 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-16 11:53:02 PST --- short a(short b) { return bcast(short)1; } Shouldn't number literals work as smallest possible type and promoted as needed? Like here: --- byte a=1; ---

[Issue 2809] Wrong constant folding for unsigned shift

2010-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 --- Comment #6 from Sobirari Muhomori dfj1es...@sneakemail.com 2010-11-16 11:59:34 PST --- Number literals are polysemous, right? So binary ops should work like this: opBinary(l,r) { if(is(typeof(r)==polysemous)) {

[Issue 2809] Wrong constant folding for unsigned shift

2010-11-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 simon s.d.hamm...@googlemail.com changed: What|Removed |Added CC|

[Issue 2809] Wrong constant folding for unsigned shift

2010-11-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 --- Comment #4 from Don clugd...@yahoo.com.au 2010-11-15 15:06:34 PST --- (In reply to comment #3) Mr Bs test case is wrong: static assert((cast(short)-1 1) == int.max); should be: static assert((cast(short)-1 1) == short.max); Not

[Issue 2809] Wrong constant folding for unsigned shift

2010-01-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch --- Comment #2 from

[Issue 2809] Wrong constant folding for unsigned shift

2010-01-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2809 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au