Is it possible to use a variable argument on the macro function(#define)?
For example on visual c++,
#define DTRACE(...) LogMsg( __VA_ARGS__);
how could i use this expression on CCS?
regards
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Is it possible to use a variable argument on the macro function(#define)?
For example on visual c++,
#define DTRACE(...) LogMsg( __VA_ARGS__);
how could i use this expression on CCS?
regards
It looks like since variadic macros are supported in GCC, if you enable GCC extensions, it compiles (I didn't test to see if it runs correctly). To enable GCC extensions, it's under Properties->C/C++Build->Settings->Compiler->Language Options (may vary depending on your CCS version).