Can anyone tell when g++ replaces the __FUNCTION__ \'macro\' with the string containing the function name? It seems it can replace it not until it has check the
__FUNCTION__
__FUNCTION__ is not standard. Use __func__. As the documentation says, it's as if:
__func__
function_name( ) { static const char __func__[] = "function-name"; ...