Re:Tips on writing C macros
by paulbaumgart on Tuesday August 04, 2009 @09:21PM
(#742607)
It compiles fine on GCC. For other compilers, the Wikipedia page I linked offers the caveat:
"This construct is not legal ANSI C; both the typeof keyword, and the construct of placing a compound statement within parentheses, are non-standard extensions implemented in the popular GNU C compiler (GCC)."
It's much nicer to be able to call "MYMACRO(1, 2, 3);" than it is to have to remember to leave the semi-colon off.