Gstreamer compiled with gcc 5.2 and -Wpedantic produces the
following warning:
'ISO C does not support '__FUNCTION__' predefined identifier [-Wpedantic]
const char *s = __FUNCTION__;'
Since gcc 5 enables C99 by default, use __func__ if it's available
instead of the non-standard __FUNCTION__ (as suggested in [2]).
[1]: https://gcc.gnu.org/gcc-5/changes.html
[2]: https://gcc.gnu.org/gcc-5/porting_to.html
https://bugzilla.gnome.org/show_bug.cgi?id=758541
* function signature in C++ code.
*/
#ifndef GST_FUNCTION
-#if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
-# define GST_FUNCTION ((const char*) (__FUNCTION__))
-#elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define GST_FUNCTION ((const char*) (__func__))
+#elif defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
+# define GST_FUNCTION ((const char*) (__FUNCTION__))
#else
# define GST_FUNCTION ((const char*) ("???"))
#endif