Remix.run Logo
Int a = 5; a = a++ + ++a; a =? (2011)(gynvael.coldwind.pl)
3 points by e-topy a day ago | 3 comments
magicalhippo a day ago | parent | next [-]

Perhaps I'm just naive and/or have forgotten too much C, not that I knew that much, but I'm a bit perplexed as to why this is UB.

It seems like something that should trigger a "we should specify this" reaction when adding these operators, and there is at least one reasonable way to define it which is fairly trivial and easily implementable.

Tomte a day ago | parent | prev | next [-]

Some C++ quiz with ++a and a++? It‘s always about sequence points, or better the lack of sequence points.

It‘s the standard technical C++ blog post everybody seems to write.

nDRDY a day ago | parent | prev [-]

Oh god. How long before yet another UB-based question ends up in technical coding interviews?