macro dependent macro
问题 Is it possible to do something like this: #define F(x) \ #ifdef DOUBLE \ 2*x \ #else \ x \ #endif so that when I use F , what it expands to depends on whether the macro DOUBLE is defined? I don't think so, but I'm hopeful. GNU expansions are fine. Edit In response to some of the answers, I'm really using this to do some code generation, where the code is slightly different depending on where it gets defined. Because of the order in which some files are included and where the relevant macros