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 782708 - Multiple typedef definitions not allowed in older versions of GCC
Multiple typedef definitions not allowed in older versions of GCC
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-16 20:54 UTC by The Written Word
Modified: 2017-05-17 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove duplicate typedef entries to build with older GCC releases (1.25 KB, text/plain)
2017-05-16 20:55 UTC, The Written Word
Details

Description The Written Word 2017-05-16 20:54:15 UTC
Repeating "typedef <a> <b>;" is not allowed by earlier versions of GCC (4.7+ work). This might not even be legal: http://stackoverflow.com/questions/8367646/redefinition-of-typedef.

This causes a problem when trying to build gtksourceview-3.22.2 and above on RHEL6 which has gcc-4.4.7 as the system compiler:
...
In file included from ../../../gtksourceview/gtksource.h:57,
                 from gtksourcecompletionwords.c:41:
../../../gtksourceview/gtksourcetag.h:43: error: redefinition of typedef 'GtkSourceTag'
../../../gtksourceview/gtksourcetypes.h:63: note: previous declaration of 'GtkSourceTag' was here
gmake[5]: *** [libgtksourcecompletionwords_la-gtksourcecompletionwords.lo] Error 1
gmake[5]: Leaving directory `/opt/build/gtksourceview-3.22.2/gtksourceview/completion-providers/words'
Comment 1 The Written Word 2017-05-16 20:55:22 UTC
Created attachment 351993 [details]
Remove duplicate typedef entries to build with older GCC releases
Comment 2 Sébastien Wilmet 2017-05-17 15:35:06 UTC
I've pushed:
commit 42ffea75552f30a44a35ba70c3d8c177e5319656 on master.
commit a5b57e6d3a2bd6a0297eb3c8cf48a24477f12ffa on gnome-3-24.

Your patch was not formatted with git format-patch, and was missing one type, so I've created a proper commit myself.

Thanks for the bug report.