Re:A very old gcc "bug"
by yuvi on Sunday October 25, 2009 @09:06PM
(#902452)
I re-read C99, and the reason this is allowed is not because of §6.5.2.2 p10, but rather §6.5.16 p4 as far as I can tell. Though it's weird to me that the expression (x = 2) can ever be evaluated as anything but 2.
Also, it's not illegal C, it's undefined C and compilers are only allowed to do whatever they want within the undefined area (which is larger than I expected.)
Also, it's not illegal C, it's undefined C and compilers are only allowed to do whatever they want within the undefined area (which is larger than I expected.)