------- Comment #1 from pluto at agmk dot net 2006-03-29 18:51 ------- It's not a gcc bug. The code relies on the results of intermediate subexpressions. According to Stroustrup, The C++ Programming Language, section 6.2.2, "The order of evaluation of subexpressions within an expression is undefined."
You should use sequence points e.g.: a ^= b, b ^= a, a ^= b; This is a dup of PR11751 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26923