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 734973 - compiler-flags: allow suppressing warnings
compiler-flags: allow suppressing warnings
Status: RESOLVED FIXED
Product: gnome-common
Classification: Core
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Gnome Common Maintainer(s)
Gnome Common Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-17 23:26 UTC by Michael Catanzaro
Modified: 2014-08-18 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
compiler-flags: allow suppressing warnings (1.06 KB, patch)
2014-08-17 23:26 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2014-08-17 23:26:41 UTC
I get tons of compiler warnings using GNOME_COMPILE_WARNINGS([no]). I think this should actually turn off all compiler warnings using -w. Useful for compiling V
ala code, where we can't do anything about C warnings and they only distract fro
m the Vala warnings we care about.

I'm not really sure about the minimal and maximum settings either, since -Wall doesn't seem very minimal and missing -Wextra does not seem very maximal, but these are maybe for the best since there are a lot of projects using maximum that probably don't want -Wextra.
Comment 1 Michael Catanzaro 2014-08-17 23:26:43 UTC
Created attachment 283697 [details] [review]
compiler-flags: allow suppressing warnings

Some projects want to see no warnings at all, for example, projects that
are written in Vala. But GNOME_COMPILE_WARNINGS([no]) is a no-op that
does nothing to turn off the default compiler warnings. Presumably if
you ask for no compiler warnings, you want no compiler warnings, so
suppress them in this case instead.
Comment 2 Philip Withnall 2014-08-18 07:13:05 UTC
Review of attachment 283697 [details] [review]:

Looks good to me, but bear in mind bug #729407, which is moving gnome-compiler-flags.m4 to autoconf-archive, with the intention that modules copy it in-tree from there in future. If we commit this patch soon, it’ll get into the autoconf-archive version (which I still haven’t got round to making :-( ).
Comment 3 Michael Catanzaro 2014-08-18 13:44:47 UTC
The autoconf archive is probably a more appropriate place.

Attachment 283697 [details] pushed as cdb06bc - compiler-flags: allow suppressing warnings