GNU bug report logs - #15327
24.3; Incorrect "Unused lexical variable" warning with avl-tree-create

Previous Next

Package: emacs;

Reported by: Christopher Wellons <wellons <at> nullprogram.com>

Date: Tue, 10 Sep 2013 18:36:01 UTC

Severity: normal

Found in version 24.3

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15327 in the body.
You can then email your comments to 15327 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15327; Package emacs. (Tue, 10 Sep 2013 18:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Wellons <wellons <at> nullprogram.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 10 Sep 2013 18:36:02 GMT) Full text and rfc822 format available.

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

From: Christopher Wellons <wellons <at> nullprogram.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Incorrect "Unused lexical variable" warning with avl-tree-create
Date: Tue, 10 Sep 2013 14:35:32 -0400
;;; -*- lexical-binding: t; -*-
(require 'avl-tree)
(avl-tree-create #'string<)


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
 of 2013-06-25 on sochi, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux unstable (sid)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15327; Package emacs. (Tue, 10 Sep 2013 18:42:02 GMT) Full text and rfc822 format available.

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

From: Christopher Wellons <wellons <at> nullprogram.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 24.3;
 Incorrect "Unused lexical variable" warning with avl-tree-create
Date: Tue, 10 Sep 2013 14:40:32 -0400
Sorry, I accidentally hit send early. If the above is compiled,

    $ emacs -Q -batch -f batch-byte-compile tmp.el
    In toplevel form:
    tmp.el:3:1:Warning: Unused lexical variable `cmpfun'
    Wrote /tmp/tmp.elc

Due to improper macro expansion of avl-tree-create by defstruct,

    (let
        ((cmpfun #'string<))
      (progn
        (vector 'cl-struct-avl-tree-
                (progn
                  (vector nil nil nil 0))
                #'string<)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15327; Package emacs. (Tue, 10 Sep 2013 21:09:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Christopher Wellons <wellons <at> nullprogram.com>
Cc: 15327 <at> debbugs.gnu.org
Subject: Re: bug#15327: 24.3;
 Incorrect "Unused lexical variable" warning with avl-tree-create
Date: Tue, 10 Sep 2013 17:08:03 -0400
> Sorry, I accidentally hit send early. If the above is compiled,

>     $ emacs -Q -batch -f batch-byte-compile tmp.el
>     In toplevel form:
>     tmp.el:3:1:Warning: Unused lexical variable `cmpfun'
>     Wrote /tmp/tmp.elc

> Due to improper macro expansion of avl-tree-create by defstruct,

>     (let
>         ((cmpfun #'string<))
>       (progn
>         (vector 'cl-struct-avl-tree-
>                 (progn
>                   (vector nil nil nil 0))
>                 #'string<)))

IIUC I fixed this recently in the trunk (the bug was in the expander
part of cl-defsubst).


        Stefan




bug closed, send any further explanations to 15327 <at> debbugs.gnu.org and Christopher Wellons <wellons <at> nullprogram.com> Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Wed, 11 Sep 2013 12:33:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Oct 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 252 days ago.

Previous Next


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