Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
x=(x=5,11)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="ena8t8si, post: 2470779"] All ok up to this point. This step is where your reasoning goes wrong. Consider this sequence of evaluation, writing {f(1)} to mean the temporary value that resulted from a previous evaluation of f(1), and similarly {f(0)}, {f(2)}, {f(3)}: f(0) (*{f(0)})++ f(2) (*{f(2)})++ f(1) f(3) (*{f(1)})++ (*{f(3)})++ For the last two lines, {f(1)} == {f(3)}. There are no sequence points, but both lines update what the pointers point to, in other words they update the same object. That's undefined behavior. The relevant side effect operators are outside the function calls, and both side effects may be done after both function calls have completed. It's the same, as I have explained above. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
x=(x=5,11)
Top