Comment

Comment by rwmj

I know he's trying (badly) to make some point about undefined behaviour and/or strict reading of the C standard, but his answers are simply wrong. The first case, for example, returns 8 [edit: the size of the structure] (not "I don't know") under any reasonable compiler, and isn't even UB. The second one returns 0, and is also not UB. etc.

Also if someone wrote this bit of obscurantism in any programming language it should be rejected hard when reviewing the code:

  return (((((i >= i) << i) >> i) <= i));
parent rwmj 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton