User Activity

  • Posted a comment on discussion Development on cppcheck

    Thanks for creating the bug report!

  • Modified a comment on discussion Development on cppcheck

    The following C program compiles, but cppcheck reports a macro expansion problem: #define ADDER_S(a,b) a+b #define ADDER(x) ADDER_S(x) #define ARGUMENTS 1, 2 #define RUN ADDER(ARGUMENTS) int test(void) { //ADDER(ARGUMENTS); // Works RUN; // Fails!! return 0; } The actual error looks like this: $ cppcheck test.c test.c:2:0: error: failed to expand 'RUN', Wrong number of parameters for macro 'ADDER_S'. [preprocessorErrorDirective] #define ADDER(x) ADDER_S(x) I'm testing with the latest commit of master...

  • Posted a comment on discussion Development on cppcheck

    The following C program compiles, but cppcheck reports a macro expansion problem: #define ADDER_S(a,b) a+b #define ADDER(x) ADDER_S(x) #define ARGUMENTS 1, 2 #define RUN ADDER(ARGUMENTS) int test(void) { //ADDER(ARGUMENTS); // Works //do {ADDER(ARGUMENTS);} while(0); // Works RUN; // Fails!! return 0; } The actual error looks like this: $ cppcheck test.c test.c:2:0: error: failed to expand 'RUN', Wrong number of parameters for macro 'ADDER_S'. [preprocessorErrorDirective] #define ADDER(x) ADDER_S(x)...

View All

Personal Data

Username:
greenfoo
Joined:
2024-09-30 15:47:32.692000

Projects

  • No projects to display.

Personal Tools

MongoDB Logo MongoDB