Re: Strange shifting behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ulf,

>When shifting an int by its size in bits...

That is undefined behavior (implementation dependent), as per C and C++ standards.  Ever since C was first taking it's first baby steps.

By "undefined behavior", that means any given particular implementation can:
+ not do anything
+ do what you expect
+ SEGV
+ format your hard drive

--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux