3 ms·
With GCC specifics, you can define MAX as a macro without calling the function twice. #define max(a,b) \ ({ typeof (a) _a = (a); \ typeof (b)
by kmm 15y ago
With GCC specifics, you can define MAX as a macro without calling the function twice.
#define max(a,b) \
({ typeof (a) _a = (a); \
typeof (b) _b = (b); \
_a > _b ? _a : _b; })