Failure to Compile Variadic Macro in FR Softune V6 - KBA218954

Version 2

    Version: **


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



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



    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:




    #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.