Previous Table of Contents "New C Standard" commentary
810
The identifier
static const char __func__[] = "function-name";
appeared, where function-name is the name of the lexically-enclosing function.61)
811 This name is encoded as if the implicit declaration had been written in the source character set and then translated into the execution character set as indicated in translation phase 5.
812 EXAMPLE Consider the code fragment:
#include
void myfunc(void)
{
printf("s\n", __func__);
/* ... */
}
Each time the function is called, it will print to the standard output stream:
813 Forward references: function definitions (6.9.1).
814
61) Since the name
Next
Created at: 2008-01-30 02:39:41
The text from WG14/N1256 is copyright © ISO