[gstreamer-bugs] [Bug 567692] New: gstreamer gstinfo.h header not compatible with C++
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Jan 13 16:23:22 PST 2009
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=567692
GStreamer | gstreamer (core) | Ver: 0.10.x
Summary: gstreamer gstinfo.h header not compatible with C++
Product: GStreamer
Version: 0.10.x
Platform: Other
OS/Version: opensolaris
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: brian.cameron at sun.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Description
/usr/include/gstreamer-0.10/gst/gstinfo.h includes the following
#ifndef GST_FUNCTION
#if defined (__GNUC__)
# define GST_FUNCTION ((const char*) (__FUNCTION__))
#elif defined (G_HAVE_ISO_VARARGS)
# define GST_FUNCTION ((const char*) (__func__))
#else
# define GST_FUNCTION ((const char*) ("???"))
#endif
#endif /* ifndef GST_FUNCTION */
When using Sun Studio CC, __GNUC__ is not set. However, G_HAVE_ISO_VARARGS is
set (in /usr/lib/glib-2.0/include/glibconfig.h), for both C and C++ compilation
(which in my opinion is correct). So this does not compile with CC (I expect
that it shouldn't compile either with cc for ISO C 90 code, but I haven't tried
that). This is because '__func__' is an ISO C 99 feature. GCC allows this
feature to creep into C++ (and ISO C 90) code, but Sun Studio is stricter.
Back to gstreamer, I don't see any relationship between varargs and ISO C 99
__func__.
Steps to Reproduce
Try building Qt 4.4.1. Build will fail during Phonon.
Workaround
As a workaround, change the line testing G_HAVE_ISO_VARARGS to
#elif defined(__STDC__) && (__STDC_VERSION__ >= 199901L)
Could this issue be fixed in the GStreamer header files?
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=567692.
More information about the Gstreamer-bugs
mailing list