GNU bug report logs - #28107
26.0.50; Byte compilation shows an unused var warning for an used variable

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Wed, 16 Aug 2017 06:13:02 UTC

Severity: minor

Tags: notabug

Found in version 26.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 28107 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 28107 <at> debbugs.gnu.org
Subject: Re: bug#28107: 26.0.50;
 Byte compilation shows an unused var warning for an used variable
Date: Thu, 17 Aug 2017 21:42:32 -0400
Tino Calancha wrote:

> ;; -*- lexical-binding: t; -*-
> (let ((x 1))
>   (and (equal (+ x 2) 3)))

This code also does nothing. Compare with:

(defun foo ()
  (let ((x 1))
   (and (equal (+ x 2) 3))))

where the result is used (as the function return) and there is no warning.




This bug report was last modified 5 years and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.