Comments on: x += x++; https://www.ticklishtechs.net/2009/01/21/x-x/ a mostly .NET but also some other cool techs blog Thu, 13 Aug 2020 18:46:34 +0000 hourly 1 https://wordpress.org/?v=5.7.11 By: Yikaton https://www.ticklishtechs.net/2009/01/21/x-x/comment-page-1/#comment-6592 Wed, 30 Sep 2009 06:13:23 +0000 http://www.ticklishtechs.net/2009/01/21/x-x/#comment-6592 I don’t know about C# and Java, but wrt C and C++ the only correct statement is “NEVER write code like this!”
x += x++ is simply undefined for basic types (int, double, …) http://c-faq.com/expr/ieqiplusplus.html

Why am I the first to comment? maybe only Google (that gave me this page) has read it. So this will be my boyscout good did of today: correct one C-misconception for one person.
Sigh …

]]>