#define INLINE static inline __attribute__((always_inline))
INLINE void swap(int a, int b){
int tmp = a;
a = b;
b = tmp;
}
int main(){
int x = 10;
int y = 20;
swap(x, y);
printf("x:%d y:%d", x, y);
return 0;
}
output: x:10 y:20
If inline functions are insert to the function they are called, why does this function not give correct results?