Hacker News
Int a = 5; a = a++ + ++a; a =? (2011)
3 points by e-topy
ago
|
3 comments
magicalhippo
|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
|next
|previous
[-]
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
|previous
[-]
Oh god. How long before yet another UB-based question ends up in technical coding interviews?