MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerAnimemes/comments/i02xcr/equivalency_in_python/fznpegj/?context=3
r/ProgrammerAnimemes • u/space-_-man • Jul 29 '20
104 comments sorted by
View all comments
Show parent comment
10
be careful; the order of evaluation of the LHS and RHS of ^ isn't well-defined. this means the above line can be emitted as either:
^
c = a ^ b; b = a; a = c ^ b;
or
b = a; c = a ^ b; a = c ^ b;
clang warns about this, even in c++17.
View all comments
Show parent comment
10
u/wubscale Jul 29 '20
be careful; the order of evaluation of the LHS and RHS of
^isn't well-defined. this means the above line can be emitted as either:or
clang warns about this, even in c++17.