Visual studio __VA_ARGS__ issue
I run cl /P test.cpp, the file and result is as following. test.cpp #define FiltedLog( ...) \ if (logDetail) \ MP_LOG(LOG_INFO, __VA_ARGS__); #define MP_LOG(level,fmt,...) \ BOOAT::LOG("MP", level, fmt, ##__VA_ARGS__) #define LOG(tag,level,fmt,...) \ Log::log(tag, level, "%s: " fmt, __PRETTY_FUNCTION__, ##__VA_ARGS__) int main () { FiltedLog ( "abc", 1, 2); } Cl /P test.cpp : #line 1 "test.cpp" int main () { if (logDetail) BOOAT::Log::log("MP", LOG_INFO, "%s: " "abc", 1, 2, __PRETTY_FUNCTION__ );; } I wonder why the __PRETTY_FUNCTION__ are put as the last arguments in the result. I assume the