[Bug 758541] gstinfo: Fix ISO non-standard predefined identifier warning for __FUNCTION__ when compiled with gcc 5 -Wpedantic

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Nov 23 06:20:45 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=758541

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #316094|none                        |reviewed
             status|                            |

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 316094
  --> https://bugzilla.gnome.org/attachment.cgi?id=316094
Patch to address the issue.

> #ifndef GST_FUNCTION
> #if defined (__GNUC__) || (defined (_MSC_VER) && _MSC_VER >= 1300)
>-#  define GST_FUNCTION     ((const char*) (__FUNCTION__))
>+#  if __GNUC__ < 5
>+#    define GST_FUNCTION     ((const char*) (__FUNCTION__))
>+#  else
>+#    define GST_FUNCTION     ((const char*) (__func__))
>+#  endif
> #elif defined (__STDC__) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
> #  define GST_FUNCTION     ((const char*) (__func__))
> #else

I wonder if moving up the 

 #elif defined (__STDC__) && defined (__STDC_VERSION__) && 

would also fix this issue?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list