9

I was reading this article http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/ and the first snippet of code there is this, which is apparently taken form the linux kernel:

#define min(x, y) ({                \
    typeof(x) _min1 = (x);          \
    typeof(y) _min2 = (y);          \
    (void) (&_min1 == &_min2);      \
    _min1 < _min2 ? _min1 : _min2; })

Now why do they need the (void) (&_min1 == &_min2); line?

Patrick B.
  • 11,773
  • 8
  • 58
  • 101
user10607
  • 3,011
  • 4
  • 24
  • 31

0 Answers0