5.66 __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'.
Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.