From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: Re: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'? Date: Fri, 8 Jan 2021 14:15:26 +0100 Message-ID: References: <87o8hzj0hh.fsf@zoho.eu> <20210108110743.GB21347@tuxteam.de> <87pn2fhadb.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26910"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 08 14:16:05 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxrca-0006si-M7 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Jan 2021 14:16:04 +0100 Original-Received: from localhost ([::1]:51670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxrcZ-0004xn-OK for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Jan 2021 08:16:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxrcD-0004xf-Dx for help-gnu-emacs@gnu.org; Fri, 08 Jan 2021 08:15:41 -0500 Original-Received: from mail-ot1-x32a.google.com ([2607:f8b0:4864:20::32a]:42739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxrcB-0000In-UD for help-gnu-emacs@gnu.org; Fri, 08 Jan 2021 08:15:41 -0500 Original-Received: by mail-ot1-x32a.google.com with SMTP id 11so9568666oty.9 for ; Fri, 08 Jan 2021 05:15:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Aga9phWe4B/ktPcYylTr4cWfCl11kqJMGhmtmAvyfps=; b=jEq86HL7dfshDke77w3KchvKl9Uy+pI2srBqRc5m6oLulzIeBY7A+DCgd/gKvZp3bo 1bIHZGVuGOTm5xRIo539GyL5KlBXjeQ86kcLPoPAsSslr8F9OW1PvX0Yaojh5KOWFXyW KfGNcIjnrpkLU6uOMq3Oy+WerNsPwTrNxh2+465Ag7d2qTS62CDG66S4TWIF0xKeSPFv /7Xfs23vEIpUuZSn/ZoPfIQy3DDd6yLRBAeBbRgXjn4NlF3tKqOG3Pe1zAZQ5tiuaslx mbNOo/vY+CnUq1HSpVl/z3WMLdjMYOk6D7+VkW3trHwEF3wGBt/R0l8y6j6ApRWV86a7 M1dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Aga9phWe4B/ktPcYylTr4cWfCl11kqJMGhmtmAvyfps=; b=qVdbh2JtIInFnq9SC8F6dOW1hgmqAAI92QhWNIoyHR+SxkCF2MP5BZQsaMTauTVyjw Zx8LPJYMWsXyQ5RpY3sCBaK9VEwjF+IvhZtMhPR/NqRrXjiLVJypk955XdDnoLF5LpS0 h9SkVqsTCxwp/5qSMkGsC0zooyJP7/A3EoMdo638C5Pr7J/ZOTnNfhMsvFwRXcFdAwzx XRVGem+Gt9UFPLl+3fYrhB621PWhRQgcV3AnWGA8xe6kQ6sknudVDb47Y/gOsrL1y6/e jU7okOYVwq7UDNoQbQrmmeATmjHcyk44Ep/MyUttRCeRa3q5m70NO21wjNAUoU3CqUtL e5Ww== X-Gm-Message-State: AOAM532YNgx0fLWaaSoV40MOpDbs+7FMvz/8Y59HHvJf0VcGkWnFZ6OK c8WfkdSGp/WS63VA5Q+z1++CoQ8srzw8H/gnUXA= X-Google-Smtp-Source: ABdhPJwvj+Ws9ZF2FB7WIPvTv7OdHjCVM1ZhhKoUu2UD2xAsT+lmxAFyp14GvHhXTS5MMVTtgLjtR9L6yNMBwDJKlpU= X-Received: by 2002:a05:6830:578:: with SMTP id f24mr2414748otc.36.1610111738093; Fri, 08 Jan 2021 05:15:38 -0800 (PST) In-Reply-To: <87pn2fhadb.fsf@zoho.eu> Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x32a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127104 Archived-At: Am Fr., 8. Jan. 2021 um 13:39 Uhr schrieb Emanuel Berg via Users list for the GNU Emacs text editor : > No! Again, this is a problem with the byte compiler. Not really. The byte compiler can only compile what's macro-expanded, and the macro-expansion of e.g. (dotimes (i 5 t) i) is roughly: (let ((counter 0)) (while (< counter 5) (let ((i counter)) i) (setq counter (1+ counter))) (let ((i counter)) t)) As you can see, `i' is definitely unused in the second `let' form - the byte compiler is right.