As Pushkar pointed out while(0){} is a null statement and is not used and even if you use compiler may optimize it. The only case is do..while(0) where one more possibility is the following (Credit: SO)
#define FOO(x) { foo(x); bar(x); }
Using this in an if statement would require that you omit the semicolon, which is counterintuitive:
if (condition)
FOO(x)
else
...
If you define FOO like this:
#define FOO(x) do { foo(x); bar(x); } while (0)
then the following is syntactically correct:
if (condition)
FOO(x);
else
....