Every single modern compiler that I know of creates code that performs better (in the sense that it's faster and the source code is more readable) using a temporary variable.
Every single modern compiler that I know of creates code that performs better (in the sense that it's faster and the source code is more readable) using a temporary variable.
Put the xor swap into the file called "silly_magic_tricks.c".
It's a mildly interesting aside (aka party trick) which has no place in a real world programming scenario.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.