News for hackers. Stuff that matters.
Re:C99 tricks by n1mda on Friday February 13, 2015 @08:34AM (#9044186)
Any reason why they don't use trick #1 inside trick #5?

// Instead of x = x ? x : 10;

// We can use the shorter form: x = x ?: 10;

#define min(a, b) ({ \ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a < _b ? _a : _b; \ })

Re:C99 tricks by stingraycharles on Friday February 13, 2015 @08:36AM (#9044196)
Wouldn't that return _a < _b instead of _a?
Re:C99 tricks by delinka on Friday February 13, 2015 @08:55AM (#9044279)
indeed it would.