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 780675 - gcc pragma build failure
gcc pragma build failure
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-29 08:25 UTC by Patrick Welche
Modified: 2017-04-10 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (2.26 KB, patch)
2017-03-29 18:57 UTC, Felix Riemann
none Details | Review

Description Patrick Welche 2017-03-29 08:25:04 UTC
https://git.gnome.org/browse/eog/commit/src/eog-exif-util.c?id=ca4c09a64b3f33abe67d46b8dbd4e44e1e028af5

fixes build for newer gcc, but it breaks build for older gcc:

eog-exif-util.c: In function 'eog_exif_util_format_date_with_strptime':
eog-exif-util.c:121:9: error: #pragma GCC diagnostic not allowed inside functions
eog-exif-util.c:122:9: error: #pragma GCC diagnostic not allowed inside functions
eog-exif-util.c:125:9: error: #pragma GCC diagnostic not allowed inside functions

http://nyftp.netbsd.org/pub/pkgsrc/packages/reports/HEAD/NetBSD-6.0-x86_64/20170327.0904/eog-3.20.5nb2/build.log
Comment 1 Felix Riemann 2017-03-29 18:57:41 UTC
Created attachment 348949 [details] [review]
Proposed fix

I don't have an old enough GCC at hand, could you test if that fixes it for you?
Comment 2 Felix Riemann 2017-04-10 18:49:27 UTC
Pushed with 3.24.1.

commit d91cf5bc7f712d36fbc6dfb1b73130ea489931b1
Author: Felix Riemann <>
Date:   Wed Mar 29 20:56:11 2017 +0200

    EogExifUtil: Fix build with older GCCs
    
    Older GCCs don't support pragma diagnostic in functions.
    Move the pragmas outside to fix the build with these compilers.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780675
---
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.