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 701474 - Error building glibmm due to extra comma in glib/gtestutils.h
Error building glibmm due to extra comma in glib/gtestutils.h
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.37.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-06-02 18:02 UTC by Kjell Ahlstedt
Modified: 2013-06-03 07:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch: Remove extra comma in gtestutils.h (831 bytes, patch)
2013-06-02 18:23 UTC, Kjell Ahlstedt
accepted-commit_now Details | Review

Description Kjell Ahlstedt 2013-06-02 18:02:43 UTC
We like to build glibmm and other C++ packages with compiler flags
  -pedantic -Wall -Wextra -Wformat-security -Wno-long-long -Werror

Such builds now fail due to an extra comma in glib/glib/gtestutils.h.

typedef enum {
  G_TEST_SUBPROCESS_INHERIT_STDIN  = 1 << 0,
  G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1,
  G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2,
} GTestSubprocessFlags;

According to pedantic C and C++, the comma after the last entry in the enum
definition is not allowed.

Excerpt from the compilation error messages when glibmm is built:

/opt/gnome/include/glib-2.0/glib/gtestutils.h:183:44: error: comma at end of enumerator list [-Werror=edantic]
cc1plus: all warnings being treated as errors

This enum was added with this commit:
https://git.gnome.org/browse/glib/commit/?id=960f5500e22d505a5dccbff51ccbc8ab969f0851

   Build date and platform:
Ubuntu 12.04. Source code of glib from git's master branch,
built with jhbuild on 2013-06-02.
Comment 1 Kjell Ahlstedt 2013-06-02 18:23:12 UTC
Created attachment 245873 [details] [review]
patch: Remove extra comma in gtestutils.h
Comment 2 Colin Walters 2013-06-02 18:51:50 UTC
Review of attachment 245873 [details] [review]:

Ok.
Comment 3 Kjell Ahlstedt 2013-06-03 07:44:59 UTC
I have pushed the patch to the master branch
https://git.gnome.org/browse/glib/commit/?id=9acc480d72e9140ec1fa34d780c6d924c7a71aec