For the unfamiliar, what does this pattern do exactly?
It turns a macro argument into a string of that argument. Let's say you have a mydebug(expression) macro that should print both "expression" and the value of expression.
The macro X turns its argument into a string, but using it on its own means you can't turn other macro values into strings, only macro names.
#define F 42
#define X(s) #s
X(5) // Expands to "5" (as a string literal)
X(F) // Expands to "F" not "42"
If you add one level of recursive macro expansion, though, that expands the macro argument as well as the macro definition: #define F 42
#define X(s) #s
#define S(s) X(s)
S(5) // "5" as expected
S(F) // "42" because S(F) expands to X(42) expands to "42"
In that case it's just to convert the value of a macro into a string constant
More interestingly, you can use this trick to create code where some user-specified word appears as a string and as the name of the function. Exercice: write a macro M(x) such that compiling the code results in