all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Philipp Stephani <p.stephani2@gmail.com>,
	Philipp Stephani <phst@google.com>,
	emacs-devel@gnu.org
Subject: Re: [PATCH] Clean up a couple of compiler warnings
Date: Sun, 21 May 2017 13:33:44 -0700	[thread overview]
Message-ID: <7631cb49-7940-7758-9ec3-5530e0ab542e@cs.ucla.edu> (raw)
In-Reply-To: <CAArVCkT3G85=otipybsd_E14QFWHnr5W3w-ZVHJy82VQbeuD9g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

Philipp Stephani wrote:
> This apparently hasn't worked, at least I still get the warning, and
> there's no -Wno-missing-braces in WARN_CFLAGS.

My change didn't add -Wno-missing-braces; it removed -Wmissing-braces. This 
sufficed for Fedora 25 x86-64, which has clang 3.9.1.

Perhaps you're running a different version of Clang, which is pickier? If so, 
you might try the attached patch; if it works, please feel free to install it.

> For Clang, it'd probably be better to use -Weverything and then disable
> individual warnings with -Wno

I'd rather not spend a lot of time worrying about warnings generated by 
compilers other than recent GCC, as there are too many compilers and too many 
false alarms and it's not worth the hassle. If you'd like to take up the burden 
of pacifying Clang with tricks like the above, though, that should be fine, as 
long as it doesn't burden maintenance for the rest of us. If not, and if Clang 
continues to be a hassle, we can avoid much of the hassle by disabling warnings 
by default when the compiler is Clang.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: clang.diff --]
[-- Type: text/x-patch; name="clang.diff", Size: 402 bytes --]

diff --git a/configure.ac b/configure.ac
index 12e44d9..6d23b5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -986,6 +986,7 @@ AC_DEFUN
 
   # More things that clang is unduly picky about.
   if test $emacs_cv_clang = yes; then
+    gl_WARN_ADD([-Wno-missing-braces])
     gl_WARN_ADD([-Wno-tautological-compare])
     gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
   fi

  reply	other threads:[~2017-05-21 20:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 20:24 [PATCH] Clean up a couple of compiler warnings Philipp Stephani
2017-05-18 20:40 ` Eli Zaretskii
2017-05-19  3:48 ` Paul Eggert
2017-05-19  6:53   ` Eli Zaretskii
2017-05-19  6:55     ` Paul Eggert
2017-05-19  9:31   ` Philipp Stephani
2017-05-21  6:07     ` Paul Eggert
2017-05-21 20:00       ` Philipp Stephani
2017-05-21 20:33         ` Paul Eggert [this message]
2017-05-23 10:17           ` Philipp Stephani
2017-05-23 17:36             ` Paul Eggert
2017-05-23 19:19               ` Eli Zaretskii
2017-05-23 19:21               ` Philipp Stephani
2017-05-21 20:47         ` Perry E. Metzger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7631cb49-7940-7758-9ec3-5530e0ab542e@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.