In the C language, __FUNCTION__ can be used to get the current function\'s name. But if I define a function named a() and it is called
__FUNCTION__
#include #include
#define FUNCTION_NAME(FUNCTION) printf("FUNCTION=%s \r\n", #FUNCTION);
int a() { printf("A function call"); } int b() { printf("B function call"); } int main(){ FUNCTION_NAME(a); FUNCTION_NAME(b); return 0;
}