I'm trying to compile the following #define:
#define debug(string, ...) \printf ("This is "string"\n", __VA_ARGS__)
This gives the following compiler error:
error: expected a ")"
I then tried to use a different approach:
#define P_VAR(string, args...) \ printf ("This is "string"\n", ##args)
This however gives another compiler error:
error: expected an identifier
Both of these two approaches compiles without any error using GCC 4.6.1.
Any ideas how to implement this using the cl6x compiler for OMAP processor?
Solved it.
Needed to set --gcc compiler flag and it would use the C89 compiler with C99 extensions.