Kris Modrak

Results 3 comments of Kris Modrak

A work around for this issue is to use an EVAL() macro: ``` #define EVAL(...) __VA_ARGS__ #define ALL_COLORS(warm_colors) \ X(Blue) \ X(Green) \ X(Purple) \ warm_colors #define WARM_COLORS \ X(Red)...

Without the x-macro it works fine: ``` #define IF_ELSE(condition) _IF_ ## condition #define _IF_1(...) __VA_ARGS__ _IF_1_ELSE #define _IF_0(...) _IF_0_ELSE #define _IF_1_ELSE(...) #define _IF_0_ELSE(...) __VA_ARGS__ IF_ELSE(1)(red)() ``` ``` > cppcheck -E...

I managed to work around the issue by forcing extra preprocessor passes with an `EVAL4()` macro ``` #define EVAL4(...) EVAL2(EVAL2(__VA_ARGS__)) #define EVAL2(...) EVAL1(EVAL1(__VA_ARGS__)) #define EVAL1(...) __VA_ARGS__ #define IF_ELSE(condition) _IF_ ##...