GNU bug report logs - #16771
24.3.50; pcase generates irritating warnings

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Sun, 16 Feb 2014 20:34:01 UTC

Severity: minor

Tags: confirmed

Merged with 25558, 27545

Found in versions 24.3.50, 25.1

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Helmut Eller <eller.helmut <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; pcase generates irritating warnings 
Date: Sun, 16 Feb 2014 21:32:58 +0100
Compiling this example:
  ;; -*-lexical-binding:t-*-
  (eval-when-compile
    (require 'pcase))
  
  (defun foo (x)
    (pcase x
      ((and `(,sym)
            (guard (symbolp sym)))
       t)))

with emacs -batch -f batch-byte-compile foo.el produces this output:

  In toplevel form:
  foo.el:5:1:Warning: Unused lexical variable `sym'
  Wrote /tmp/foo.elc

This warning is annoying as sym is obviously used in the guard
expression and replacing sym with _sym also doesn't help because that
produces

  foo.el:5:1:Warning: variable `_sym' not left unused

In GNU Emacs 24.3.50.6 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2014-02-14 on ix




This bug report was last modified 3 years and 264 days ago.

Previous Next


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