May 18, 2017
6:54 p.m.
Paul Eggert wrote:
I think you need to look at other parts of the standard. C11 6.3.2.1 paragraph 2
That does change things, thanks. I concur with you that that paragraph (on lvalue conversion) does make the idiom in question undefined behaviour. Interestingly, that sentence is new in C11; C99 doesn't have it. (I had been looking at C99.) After a bit more looking around, I think my earlier analysis still holds for C99. This change between versions is a bit surprising. -zefram