[Issue 8007] Wrong documentation for '>>'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 2 10:45:05 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8007



--- Comment #2 from timon.gehr at gmx.ch 2012-05-02 10:46:16 PDT ---
(In reply to comment #1)
> I guess you mean it makes you think that x >> 1 is
> 
> (cast(signed!(typeof(x)))x) >> 1
> 

Yes, as it is phrased, -1U >> 1 == -1U would have to hold. The bug report is
about this.

> and that x >>> 1 is
> 
> (cast(unsigned!(typeof(x)))x) >> 1
> 
> ?
> 
> Both of which are untrue.

We should fix >>> or get rid of it.
The usual integral promotion rules are an extremely bad fit here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list