From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Clean up a couple of compiler warnings Date: Sun, 21 May 2017 13:33:44 -0700 Organization: UCLA Computer Science Department Message-ID: <7631cb49-7940-7758-9ec3-5530e0ab542e@cs.ucla.edu> References: <20170518202450.75747-1-phst@google.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8F7F2A050F0ABA1D331B119E" X-Trace: blaine.gmane.org 1495398837 5075 195.159.176.226 (21 May 2017 20:33:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 20:33:57 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 To: Philipp Stephani , Philipp Stephani , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 21 22:33:53 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dCXY0-0001Ai-2F for ged-emacs-devel@m.gmane.org; Sun, 21 May 2017 22:33:52 +0200 Original-Received: from localhost ([::1]:39223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCXY5-0001tX-FS for ged-emacs-devel@m.gmane.org; Sun, 21 May 2017 16:33:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCXXz-0001tH-L5 for emacs-devel@gnu.org; Sun, 21 May 2017 16:33:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCXXw-0000kt-Bb for emacs-devel@gnu.org; Sun, 21 May 2017 16:33:51 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36838) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCXXw-0000kG-56 for emacs-devel@gnu.org; Sun, 21 May 2017 16:33:48 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1486816007F; Sun, 21 May 2017 13:33:47 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id DWv6k3scTv6y; Sun, 21 May 2017 13:33:44 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9DCA71600A6; Sun, 21 May 2017 13:33:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VUHwYok74iLu; Sun, 21 May 2017 13:33:44 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.188.248]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7B0DA16007F; Sun, 21 May 2017 13:33:44 -0700 (PDT) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215066 Archived-At: This is a multi-part message in MIME format. --------------8F7F2A050F0ABA1D331B119E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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. Th= is=20 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,=20 you might try the attached patch; if it works, please feel free to instal= l 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=20 compilers other than recent GCC, as there are too many compilers and too = many=20 false alarms and it's not worth the hassle. If you'd like to take up the = burden=20 of pacifying Clang with tricks like the above, though, that should be fin= e, as=20 long as it doesn't burden maintenance for the rest of us. If not, and if = Clang=20 continues to be a hassle, we can avoid much of the hassle by disabling wa= rnings=20 by default when the compiler is Clang. --------------8F7F2A050F0ABA1D331B119E Content-Type: text/x-patch; name="clang.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="clang.diff" diff --git a/configure.ac b/configure.ac index 12e44d9..6d23b5d 100644 --- a/configure.ac +++ b/configure.ac @@ -986,6 +986,7 @@ AC_DEFUN =20 # More things that clang is unduly picky about. if test $emacs_cv_clang =3D 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 --------------8F7F2A050F0ABA1D331B119E--