#define max(a,b) \\ ({ typeof (a) _a = (a); \\ typeof (b) _b = (b); \\ _a > _b ? _a : _b; })
Why not simply (a>b ? a :
(a>b ? a :
Another way to determine max (at least for positive numbers)
#define MAX(a,b) sizeof(union x { char ca[a]; char cb[b];})
As a and b are accessed only once, MAX(a++,b++) gives the correct result.