On 03/02/2016 03:20 PM, kirk.pepperdine at gmail.com wrote:
> Is there a reason why this logic is wrapped in a do { …. } while(0)
Every multi-statement #define must always be wrapped in do { …. } while(0)
consider
if (blah)
MACRO;
else
stuff;
The { } mean the right thing happens with multiple statments;
the while 0 eats the trailing semicolon in
MACRO;
Andrew.