mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Revert "macros: Try to use the standard __func__ first in G_STRFUNC"
This reverts commit 9f75cc9edf
.
It breaks usage of G_STRFUNC when compiling applications with
`-Wpedantic` — `__func__` is not `#define`d, so G_STRFUNC was falling
through to using `__FUNCTION__`, which raises a warning with
`-Wpedantic`.
Fun times.
Fixes: #1755
This commit is contained in:
parent
63af8ed0ea
commit
1916700541
@ -733,10 +733,10 @@
|
||||
#endif
|
||||
|
||||
/* Provide a string identifying the current function, non-concatenatable */
|
||||
#if defined (__func__)
|
||||
#define G_STRFUNC ((const char*) (__func__))
|
||||
#elif defined (__GNUC__) && defined (__cplusplus)
|
||||
#if defined (__GNUC__) && defined (__cplusplus)
|
||||
#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
|
||||
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define G_STRFUNC ((const char*) (__func__))
|
||||
#elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300))
|
||||
#define G_STRFUNC ((const char*) (__FUNCTION__))
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user