``` // test.h #define SIMPLE(T, NAME) \ T NAME; #define ADVANCED(T, PREFIX, NAME, EXTENSION) \ SIMPLE(T, PREFIX##NAME##EXTENSION) ADVANCED(int, , foo, ) ``` ``` cppcheck -E test.h Checking test.h ... [test.h:6]: (error) failed to expand 'ADVANCED', Invalid ## usage when expanding 'ADVANCED'. ``` ``` cpp test.h # 1 "test.h" # 1 "<built-in>" # 1 "<command-line>" # 31 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 32 "<command-line>" 2 # 1 "test.h" # 9 "test.h" int foo; ```
Activity
matlo commentedon Apr 12, 2022
Same result with 0fe0ab6: