Re:Who Says C is Simple? (2010)
by kazinator on Monday March 09, 2015 @01:27AM
(#9169293)
I stopped reading after the explanations about return ((1 - sizeof(int)) >> 32);
Unless size_t is wider than 32 bits, it has undefined behavior. That's why it returns 0; it could as well be 42, or the program could terminate with or without a diagnostic message, etc.
Unless size_t is wider than 32 bits, it has undefined behavior. That's why it returns 0; it could as well be 42, or the program could terminate with or without a diagnostic message, etc.