News for hackers. Stuff that matters.
Re:Int a = 5; a = a++ + ++a; a =? (2011) by xigoi on Thursday May 14, 2026 @02:42PM (#48139425)
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.
Re:Int a = 5; a = a++ + ++a; a =? (2011) by AlotOfReading on Thursday May 14, 2026 @03:05PM (#48139742)
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.