From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Problem report #5 Date: Tue, 11 Apr 2006 20:07:05 +0200 Message-ID: References: <200604111549.k3BFnm53015141@scanner2.ics.uci.edu> <39840.128.165.123.132.1144776171.squirrel@webmail.lanl.gov> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1144778869 4944 80.91.229.2 (11 Apr 2006 18:07:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Apr 2006 18:07:49 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 11 20:07:47 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTNGx-00068W-AT for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 20:07:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTNGw-00063p-U2 for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 14:07:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTNGi-00062M-KW for emacs-devel@gnu.org; Tue, 11 Apr 2006 14:07:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTNGf-0005zu-5J for emacs-devel@gnu.org; Tue, 11 Apr 2006 14:07:10 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTNGe-0005zn-Uk for emacs-devel@gnu.org; Tue, 11 Apr 2006 14:07:09 -0400 Original-Received: from [195.135.220.15] (helo=mx2.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FTNLZ-0003kB-Ct for emacs-devel@gnu.org; Tue, 11 Apr 2006 14:12:13 -0400 Original-Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id A48721EBF0; Tue, 11 Apr 2006 20:07:06 +0200 (CEST) Original-To: herring@lanl.gov X-Yow: What UNIVERSE is this, please?? In-Reply-To: <39840.128.165.123.132.1144776171.squirrel@webmail.lanl.gov> (Stuart D. Herring's message of "Tue, 11 Apr 2006 10:22:51 -0700 (PDT)") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52708 Archived-At: "Stuart D. Herring" writes: >> 3140 prev =3D NULL; >> 3141 for (tail =3D buf->overlays_before; tail; prev =3D tail, tail = =3D next) >> 3142 { >> 3143 next =3D tail->next; >> 3144 XSETMISC (overlay, tail); >> 3145 >> 3146 /* If the overlay is not valid, get rid of it. */ >> 3147 if (!OVERLAY_VALID (overlay)) >> [...] >> 3161 >> 3162 beg =3D OVERLAY_START (overlay); >> 3163 end =3D OVERLAY_END (overlay); >> 3164 >> 3165 if (OVERLAY_POSITION (end) > pos) >> 3166 { >> 3167 /* OVERLAY needs to be moved. */ >> 3168 int where =3D OVERLAY_POSITION (beg); >> 3169 struct Lisp_Overlay *other, *other_prev; >> 3170 >> 3171 /* Splice the cons cell TAIL out of overlays_before. */ >> >> Event dead_error_condition: On this path, the condition "prev !=3D 0" = could >> not be true >> Also see events: [dead_error_line][assignment][const][const][assignmen= t] >> >> 3172 if (prev) > > It's true that tail is never 0 within the loop (loop test), and that on > every iteration but the first prev has been assigned tail, which wasn't= 0 > at the time of assignment. But on the first iteration, this test is > guaranteed to pass! No bug. The point is that prev can never get non-NULL because later prev (while still being NULL) is assigned to tail, or else the loop is exited right away in the false arm of the conditional in line 3165. But the comment before the loop explains why it is written this way: /* We don't strictly need prev in this loop; it should always be nil. But we use it for symmetry and in case that should cease to be true with some future change. */ So this is on purpose. Andreas. --=20 Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED= 5 "And now for something completely different."