Please revert #535 gmacros: Try to use the standard __func__ first in G_STRFUNC
Please revert #535 (closed), since it does not work as intended.
__func__ is part of the language for C99 and not defined per #define at least in GCC 7 and 8. Therefore with gcc (tested with GCC7 and 8) it falls through to:
#define G_STRFUNC ((const char*) (__FUNCTION__))
This is not indented by the patch. Furthermore, a warning is created if used with -Wpedantic:
warning: ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
The old behavior is absolutely fine:
if we have g++: use
__PRETTY_FUNCTION__(since it is more verbose than
__func__and we want to take advantage of it, ref. https://stackoverflow.com/questions/4384765/whats-the-difference-between-pretty-function-function-func)
otherwise if we have C99: use
otherwise if gcc: use
That's why I strongly recommend to revert the patch instead of only changing line
#if defined (__func__) into
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L.