Re: strict aliasing: how to swap pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  > #define SWAP(TYPE, A, B) do { TYPE tmp = a; b = b; b = tmp; } while (0)>>  Err,>  #define SWAP(TYPE, A, B) do { TYPE tmp = a; a = b; b = tmp; } while (0)
Seems that
#define SWAP(TYPE, A, B) do { TYPE tmp = A; A = B; B = tmp; } while (0)
would be even better.-- Jędrzej Dudkiewicz
I really hate this damn machine, I wish that they would sell it.It never does just what I want, but only what I tell it.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux