From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Fri, 16 Feb 2018 13:23:36 -0800 Message-ID: References: <128341f5-4bc1-4c03-980c-c7b2b7e7776e@email.android.com> <2a161cd5-4293-1ccb-9fa8-ba604b83ba4a@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1518816130 25420 195.159.176.226 (16 Feb 2018 21:22:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 21:22:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: Andy Moreton , emacs-devel@gnu.org To: Paul Eggert , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 16 22:22:05 2018 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 1emnS5-0005f9-B5 for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2018 22:21:53 +0100 Original-Received: from localhost ([::1]:34199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emnU7-0008DA-CP for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2018 16:23:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emnTu-0008B1-DB for emacs-devel@gnu.org; Fri, 16 Feb 2018 16:23:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emnTt-0007n4-Em for emacs-devel@gnu.org; Fri, 16 Feb 2018 16:23:46 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:48604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emnTt-0007mx-3E; Fri, 16 Feb 2018 16:23:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=ZJ5DlJMFVMFcqqUvRrA5h6eo5daXLvOYK3glxQEUuF8=; b=gIZZ+jKl8ihNutLux9x+ta3Z9AexQQcl8ErS69me/Q9i69fvS4coDcUitDaCKQI4HmRwlvQxl7bqqU56VHaMKjFMjXooFs8s2G2Ic4pksx3UwkXi3UcwB4tcCyM2VP5h9IK2BngJF96axvASigbWFiHqkx7OJ3WKJbNdRQNKC+3aQ6yK08y5vvOz0uyIbWLkJh009dTouO/7hvt6brycTTvGj9sxvOWvelam5v1BU+KR3z0OW0mgiudB5kL4I/o9tjX9ApyX7e2U4U6ib/inQLqLUV3YU3roNj4VeAsV+2nAR4YScLc46ynk+B1VmMVZVCXlnNjM5L8/nHpFXIy8Xw==; Original-Received: from [2604:4080:1321:8ab0:6046:2e80:d3e:2b67] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1emnTr-0000aS-BI; Fri, 16 Feb 2018 13:23:43 -0800 In-Reply-To: <2a161cd5-4293-1ccb-9fa8-ba604b83ba4a@cs.ucla.edu> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:222846 Archived-At: On 02/16/2018 01:09 PM, Paul Eggert wrote: > On 02/16/2018 12:43 PM, Daniel Colascione wrote: >> IMHO, we should enable -Wconversion more broadly. > > My experience is just the opposite: i.e., that -Wconversion causes more > trouble than it cures. The pdumper change to INTEGER_TO_CONS is an > example of trouble. The only reason for that change is to work around a > compiler bug in GCC that is caused by -Wconversion, a bug that leads to > a false alarm. I suggest at least the attached patch, which limits the > damage to pdumper.c instead of letting it spread to other Emacs modules. > But better yet, I suggest dropping the idea of using -Wconversion even > on pdumper.c, as it's counterproductive and in high-quality code almost > inevitably leads to further obfuscation like ALLOW_IMPLICIT_CONVERSION > and DISALLOW_IMPLICIT_CONVERSION. -Wconversion helped me find real bugs and otherwise mysterious bugs in pdumper. It also, apparently, found a longstanding subtle bug in a completely different part of Emacs. Outside of certain specialized casting facilities, -Wconversion ought to warn only on things that are actually problems. Have a counter-example? The ALLOW_IMPLICIT_CONVERSION and DISALLOW_IMPLICIT_CONVERSION macros are there in pdumper to account for the rest of Emacs not being conversion-clean; if everything worked with -Wconversion, we wouldn't need the bracketing. > PS. Double-parens like that shouldn't be needed in macro bodies, as each > macro must parenthesize its argument properly anyway. Thanks.