[Oberon] OBNC Sets incorrect output

thutt at harp-project.com thutt at harp-project.com
Mon Mar 21 04:53:20 CET 2022


Joerg writes:
 >    {32} will be translated to (0x1u << 32)
 > 
 >    I‘m not a C specialist, but shouldn‘t it read (0x1ull << 32)

It varies from compiler to compiler.  With gcc, this will facilitate
shifting more than 31 bits.

But, shifting more than the number of bits in an integer is entering
into 'undefined behavior' (or is it 'implementation defined')
territory.

-- 
I have never met a beet which I like.




More information about the Oberon mailing list