I am not 100% sure if this is the reason, but I know that if you do
#define FOO do{ doStuff(); } while(0)
And then turn on the MSVC 4 (/ W4) compiler warning level, you will get warning C4127. But if you do this:
#define FOO do{ doStuff(); } while((void)0,0)
warning C4127 goes away. Perhaps there are other reasons for using while((void)0,0) rather than while(0) , I'm not sure ...
mchiasson
source share