From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix compilation erorr when --enable-gcc-warnings passed Date: Sat, 23 Jan 2016 11:23:11 +0200 Message-ID: <83oacc645c.fsf@gnu.org> References: <1453460084-19646-1-git-send-email-kuleshovmail@gmail.com> <56A2C41C.7030401@cs.ucla.edu> <20160123062857.GA1205@localhost> <56A342F8.1080303@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453540993 22620 80.91.229.3 (23 Jan 2016 09:23:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 09:23:13 +0000 (UTC) Cc: emacs-devel@gnu.org, kuleshovmail@gmail.com To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 23 10:23:11 2016 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 1aMuPX-0002o0-9g for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2016 10:23:11 +0100 Original-Received: from localhost ([::1]:56638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuPW-000752-9Z for ged-emacs-devel@m.gmane.org; Sat, 23 Jan 2016 04:23:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuPJ-00074f-Q2 for emacs-devel@gnu.org; Sat, 23 Jan 2016 04:22:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMuPG-0006hm-L3 for emacs-devel@gnu.org; Sat, 23 Jan 2016 04:22:57 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMuPG-0006hi-Hh; Sat, 23 Jan 2016 04:22:54 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1819 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aMuPE-0002sz-3p; Sat, 23 Jan 2016 04:22:52 -0500 In-reply-to: <56A342F8.1080303@cs.ucla.edu> (message from Paul Eggert on Sat, 23 Jan 2016 01:08:08 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:198625 Archived-At: > From: Paul Eggert > Date: Sat, 23 Jan 2016 01:08:08 -0800 > Cc: emacs-devel@gnu.org > > I installed a patch into emacs-25 to replace the compile-time warning with a > run-time crash, if you configure --with-cairo --enable-checking and visit a .png > file. If we know in advance that some scenario doesn't work, then eassert is not TRT. We should signal an error instead. eassert is for things that "cannot happen", i.e. they are there to help us discover the (unknown) scenarios where our assumptions are false. In this case, the scenario is already known, and moreover it is very simple to trigger, so aborting is not the best strategy.