There is no reason to use __FUNCTION__
.
__func__
is the standard one (C99, C11, C17). C11 6.4.2.2p1:
The identifier __func__
shall be implicitly declared by the translator as if, immediately following the opening brace of each function definition, the declaration
static const char __func__[] = "function-name";
From GCC documentation:
__FUNCTION__
is another name for __func__
, provided for backward compatibility with old versions of GCC.
And if you want to know how old, __func__
appeared in GCC 2.95, released July 31, 1999. Mind you, you do not need __FUNCTION__
for anything else but to support GCC 2.94 or earlier. If you do, then that warning is probably least of your worries.
However, __func__
isn't available in C89/90 mode either, so you'd get a warning there. If you care about ISO diagnostics, then you need to use a more recent revision. Modern GCCs default to GNU C11 or C17 already.
See also: What's the difference between __PRETTY_FUNCTION__
, __FUNCTION__
, __func__