News for hackers. Stuff that matters.
Re:C Macro Magic by foldr on Thursday February 28, 2019 @11:08AM (#19272330)
You're probably not turning on optimization. For example, gcc 8.3 with -O3 gives the result that the OP posted.

There's no undefined behavior in that example, as far as I can see. The point is that the compiler optimizes away all of the actual computation, since it's able to determine at compile time that the result will always be 0x20.

There are no comments on this comment yet.