This code will only run on GCC.  With the current code the macro is meant as an expression, meaning you do something like x = SWAP(x);  If you wrapped this in a do { } while() it could only be a statement, but this isn't how the intrinsics or macros are designed to be used.