The contest that I posted the other day received some very nice entries. I decided to pick multiple winners since the best entries illustrate consequences of several kinds of undefined behavior. First, hereâs the runner up, submitted by Octoploid: int main (void) { int x = 1; while (x) x <<= 1; return x; } This program is undefined by C99, where signed left shifts must not push a 1 bit into or pas
{{#tags}}- {{label}}
{{/tags}}