After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 125635 - 0.7.1 does not compile with older gcc
0.7.1 does not compile with older gcc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.7.0
Other Linux
: Normal normal
: 0.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-10-27 21:53 UTC by Mike Castle
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Castle 2003-10-27 21:53:53 UTC
Apparently older gcc's handle macros with variable arguments slightly
differently.  From this section of the gcc manual for the version I am
using, I suspect the offhand comment here has actually been implemented:

===
   It might be better to discard the last preprocessor token instead of
the last preceding sequence of non-whitespace characters; in fact, we
may someday change this feature to do so.  We advise you to write the
macro definition so that the preceding sequence of non-whitespace
characters is just a single token, so that the meaning will not change
if we change the definition of this feature.
===

Anyway, for macros with variable arguments I had to change the last ``foo,
##stuff'' to ``foo , ##stuff''.  That is, put a space before the comma.

The following is a demonstration:

diff -ru gst-plugins-0.7.1.orig/ext/ffmpeg/gstffmpegcodecmap.c
gst-plugins-0.7.1/ext/ffmpeg/gstffmpegcodecmap.c
--- gst-plugins-0.7.1.orig/ext/ffmpeg/gstffmpegcodecmap.c       2003-07-07
14:29:16.000000000 -0700
+++ gst-plugins-0.7.1/ext/ffmpeg/gstffmpegcodecmap.c    2003-10-27
13:42:35.000000000 -0800
@@ -44,7 +44,7 @@
                      "height", GST_PROPS_INT (context->height),\
                      "framerate", GST_PROPS_FLOAT (            \
                                1.*context->frame_rate/         \
-                               context->frame_rate_base),      \
+                               context->frame_rate_base) ,     \
                      ##props)                                  \
        :                                                       \
        GST_CAPS_NEW (name,                                     \
@@ -52,7 +52,7 @@
                      "width",  GST_PROPS_INT_RANGE (16, 4096), \
                      "height", GST_PROPS_INT_RANGE (16, 4096), \
                      "framerate", GST_PROPS_FLOAT_RANGE (0,    \
-                                               G_MAXFLOAT),    \
+                                               G_MAXFLOAT) ,   \
                      ##props)
 
 /* same for audio - now with channels/sample rate


I've not finished building, so not sure if that patch is sufficient, yet. 
But if I don't post this bug now, I'll probably forget about it.

Oh yeah, gcc version 2.95.4 20020723 (prerelease)
Comment 1 David Schleef 2003-10-31 03:43:28 UTC
This is odd.  I don't understand why we don't trigger this in other
places.  Anyway, I applied the patch, as it can't hurt anything.  Let
us know if you notice any other 2.95 problems, as we don't generally
check.