logoalt Hacker News

xigoiyesterday at 6:42 PM1 replyview on HN

It would only make a difference in cases that are currently UB, so there is no program valid under current C that would be pessimized by this change.


Replies

AlotOfReadingyesterday at 7:05 PM

It's a language feature that was in K&R, and the rules around sequencing were introduced in C89. There were good reasons to believe it would pessimize code in the following decades. Dennis Richie himself pointed out that Thompson probably added the operators because compilers of the time were able to generate better code that way.