| |||
| Home > Compiler Coding Practices > __func__ predefined identifier in C99 | |||
The __func__ predefined identifier provides
a means of obtaining the name of the current function. For example,
the function:
void foo(void)
{
printf("This function is called '%s'.\n", __func__);
}
prints:
This function is called 'foo'.
Function
names (__PRETTY_FUNCTION__).