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.

macro function with variable argument



Hi,

folllowing code compiles in Visual C++ compiler but cannot be compiled with c6000 compiler(v7.4.11, and gcc support enabled).

#define LogL2(f_, ...) printf((f_), __VA_ARGS__)
//#define LogL2(f_, ...) vrintf((f_), __VA_ARGS__) // vprintf did not make a difference

LogL2("Changing SystemMode to IBIT..\n"); // this gives compile error, but no error Visual C++ compiler


LogL2("Changing SystemMode to IBIT..\n",0); // this works in both

thanks..