Possible Duplicate:
Do-While and if-else statements in C/C++ macros
What’s the use of do while(0) when we define a macro?
I often see a code like this:
#define foo() do { xxx; yyy; zzz; } while (0)
Why do-while wrapper is used here? Why not simply
#define foo() { xxx; yyy; zzz; }
?
EDIT : removed semicolon.