Because of the semantics of what a semicolon after it means. Consider:
#define FOO1(a) do { baz(a); bar(); } while(0)
#define FOO2(a) { baz(a); bar(); }
if(x==1) FOO1(1); else FOO1(1);
if(x==1) FOO2(1); else FOO2(2);
See? Both look like they should work, but only FOO1 actually does.
DS
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu