FAQ Database Discussion Community


x-macro conditional error - number comparison

c,macros,x-macros
I would like to generate compile time error for X-macro for all X(a, b) where a > b /* X(a, b) */ #define LIST \ X(10, 20) \ X(5, 20) \ X(30, 20) \ X(1, 20) So, generate error for X(30, 20) Is this possible in C? EDIT: example usage...

X-macro breaks doxygen callgraph

c,doxygen,x-macros
I have 3 files: test.c int table[] = { #define X(val) val, #include "test.x" #undef X }; void level2(void) { level3(); level4(); } void level3(void) { level4(); } test2.c void level1(void) { level2(); level3(); level4(); } void level4(void) { } test.x X(1) X(2) X(3) I use doxygen to create callgraphs...