cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Failure to Compile Variadic Macro in FR Softune V6 - KBA218954

Anonymous
Not applicable

Failure to Compile Variadic Macro in FR Softune V6 - KBA218954

Version: **

Translation - Japanese:  FR Softune V6でVariadicマクロをコンパイルできない - KBA218954 - Community Translated (JA)

Question:

What are the reasons for failure to compile the Variadic Macro: #define Macro(...) __VA_ARGS__ in FR Softune V6?

Answer:

The variadic macro is a new macro for the C99 standard of C language (ISO/IEC 9899:1999). The compiler of the FR Softune V6 supports ANSI and C90 (ISO/IEC 9899:1990) but not C99. Therefore, the variadic macro definition, as shown below, will fail when compiling in FR Softune V6:

//Eg.

#define MY_DEBUG_LOG(...)         (printf(__VA_ARGS__))

#define MY_DEBUG_TRACE(format,...)         (printf(format,##__VA_ARGS__))

For more information about the supported C/C++ language standards, refer to the FR Family Softune C/C_++ Compiler Manual for V6.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Mar 22, 2017 03:22 AM
Updated by:
Anonymous
 
Contributors