c - Macro scope guards -
possible duplicates:
why there meaningless do/while , if/else statements in c/c++ macros?
what's use of while(0) when define macro?
is there difference between
#define macro(x) \ { \ ... \ } and
#define macro(x) \ { \ ... \ } while(0) ?
do { ... } while(0) allows macro used in conditional code.
looks question has been asked before: c multi-line macro: do/while(0) vs scope block
here's link couple of reasons so, , why omit semicolon @ end.
Comments
Post a Comment