From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Fixing compilation and byte-compilation warnings before 25.1 Date: Fri, 13 Nov 2015 08:22:03 -0800 Organization: UCLA Computer Science Department Message-ID: <56460E2B.10603@cs.ucla.edu> References: <5645F670.9040601@online.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447431743 30957 80.91.229.3 (13 Nov 2015 16:22:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 16:22:23 +0000 (UTC) To: =?UTF-8?Q?Andreas_R=c3=b6hler?= , emacs-devel@gnu.org, Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 17:22:14 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZxH76-0004tB-RH for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 17:22:12 +0100 Original-Received: from localhost ([::1]:53885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH76-00078z-F4 for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 11:22:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH72-00078Z-MJ for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:22:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxH70-0007Kj-3X for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:22:08 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH6z-0007Kb-Qe for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:22:06 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6A3B7160DFA; Fri, 13 Nov 2015 08:22:04 -0800 (PST) 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 cafUYO-3Wk_3; Fri, 13 Nov 2015 08:22:03 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8E489160E5D; Fri, 13 Nov 2015 08:22:03 -0800 (PST) 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 gN0sYwtVr--c; Fri, 13 Nov 2015 08:22:03 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7397C160DFA; Fri, 13 Nov 2015 08:22:03 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194384 Archived-At: On 11/13/2015 07:46 AM, John Wiegley wrote: > The policy should be: We never have warnings in our build on GNU Linux That's a good goal, but the devil's in the details and the details aren't written down. Here's a first cut at the current situation; comments welcome. I suppose something like this should go into a text file somewhere.... I run "./configure --enable-gcc-warnings" on Fedora x86-64 with the latest GCC, and rewrite the code to fix all C-level warnings that this uncovers. This doesn't fix all warnings for older GCC versions, or for non-GCC compilers, or for x86 or sparc, or for code that is #ifdeffed out or not compiled on my plastform, etc. Some of these are not worth the hassle (e.g., older compilers) as the cost of code-clutter is not worth the benefit of possibly finding bugs with older compilers. Others are worth doing (e.g., non-x86-64 platforms, non-Fedora distros) but I lack the time and/or system access and it'd be nice if someone would volunteer. I also occasionally run valgrind on Emacs executables (actually, temacs), and try to fix the warnings it generates. This is considerably harder to do, but is a real nice thing to have on our checklist. (Right now, for example, there are a couple of memory-allocation bugs that I really would rather be fixing than writing administrative text like this. :-) It'd be nice if someone would volunteer to clean up Elisp warnings (and thanks, Juanma, for volunteering to help). For these I see the following classes: * Warnings where people install changes to .el files but don't bother to fix the warnings. I hope these are rare. We really need to get out of the habit of doing this. * Warnings where people change module X but don't clean up the warnings that this causes to modules other than X. It's a hassle for developers to catch these ('make compile-always' is little-known and expensive). Perhaps our autobuild process could catch these and send email to the developer whose changes to X causes warnings in Y. * Warnings where people change the byte-compiler to generate new, useful warnings, but don't clean up all the .el files accordingly. Here it can be a bit much to expect the developer to clean up everyone else's code. But it'd be nice if volunteers could strive to get these fixed while preparing for a release. * Warnings generated because code is intended to be portable to XEmacs or to older GNU Emacs, and so uses deprecated interfaces on purpose. As far as I know there's no convenient way to say "I know FOO is deprecated, I want to use it anyway, don't issue a warning" in code that will also work in older Emacs. This should get fixed.