Due to the order of expansion. The GCC documentation states:
Macro arguments are fully macro expanded before they are replaced in the macro body, unless they are stiffened or inserted by other tokens. After substituting, the entire macro, including substituted arguments, is scanned again to expand the macros. As a result, the arguments are double checked to expand the macros in them.
So, if the argument is stiffened, it does not expand at first. You get literal text in brackets. But if it is passed to another macro, it expands. Therefore, if you want to expand it, you need two levels of macros.
This is because there are times when you do not want to expand the argument before the line most commonly used by the assert() macro. If you write:
assert(MIN(width, height) >= 240);
you want the message to be:
Assertion MIN(width, height) >= 240 failed
and not some crazy thing that MIN extends to (in gcc it uses several gcc-specific extensions and a rather long IIRC).
source share