Hi Damian -

Compiling this with the master branch gives an error:

error: Cannot bitshift 255 by 52 because 52 is >= the bitwidth of uint(32)

For this you can thank David L. for PR 14391.

Previous to that PR, we were ending up with C semantics,
which are that shifts (in either direction) by more than the type
width cause undefined behavior (and in fact the shift width
is taken modulus the bit width on some common platforms).

Cheers,

-michael

    
    Silly me
    
    I noticed that if I effectively
    
        0xff:uint(32) << 52
    
    that the compiler does not complain of my stupidity.  All the components 
    of the expression were known at compile time.
    
    What is worse, it gives me
    
        0xff000000
    
    which is
    
        0xff:uint(32) << 24
    
    That seems a bit odd.
    
    Mind you, still silly me.
    
    Regards - Damian
    
    Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
    Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
    Views & opinions here are mine and not those of any past or present employer
    
    
    _______________________________________________
    Chapel-developers mailing list
    [email protected]
    https://lists.sourceforge.net/lists/listinfo/chapel-developers
    


_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to