From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#6750: Byte compiler: spurious message "cl used at runtime" Date: Thu, 29 Jul 2010 19:03:06 +0000 Message-ID: <20100729190306.GA2459@muc.de> References: <20100728181553.GC2999@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1280430477 11213 80.91.229.12 (29 Jul 2010 19:07:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Jul 2010 19:07:57 +0000 (UTC) Cc: 6750@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 29 21:07:54 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OeYSP-0007wm-O4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jul 2010 21:07:54 +0200 Original-Received: from localhost ([127.0.0.1]:45867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeYSP-0008RY-5y for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Jul 2010 15:07:53 -0400 Original-Received: from [140.186.70.92] (port=47236 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeYSJ-0008QT-Le for bug-gnu-emacs@gnu.org; Thu, 29 Jul 2010 15:07:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeYSI-0006Gc-LE for bug-gnu-emacs@gnu.org; Thu, 29 Jul 2010 15:07:47 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48383) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeYSI-0006GP-Ia for bug-gnu-emacs@gnu.org; Thu, 29 Jul 2010 15:07:46 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OeYD3-0005pQ-Ri; Thu, 29 Jul 2010 14:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jul 2010 18:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6750 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6750-submit@debbugs.gnu.org id=B6750.128042950722395 (code B ref 6750); Thu, 29 Jul 2010 18:52:01 +0000 Original-Received: (at 6750) by debbugs.gnu.org; 29 Jul 2010 18:51:47 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeYCo-0005pA-4F for submit@debbugs.gnu.org; Thu, 29 Jul 2010 14:51:46 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeYCm-0005p4-7c for 6750@debbugs.gnu.org; Thu, 29 Jul 2010 14:51:45 -0400 Original-Received: (qmail 94748 invoked by uid 3782); 29 Jul 2010 18:51:56 -0000 Original-Received: from acm.muc.de (pD9E530D8.dip.t-dialin.net [217.229.48.216]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Thu, 29 Jul 2010 20:51:55 +0200 Original-Received: (qmail 2974 invoked by uid 1000); 29 Jul 2010 19:03:06 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 29 Jul 2010 14:52:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39058 Archived-At: Hi, Stefan, On Thu, Jul 29, 2010 at 01:01:46AM +0200, Stefan Monnier wrote: > > In this macro declaration: > > (defmacro c-declare-lang-variables () > > `(progn > > ,@(mapcan (lambda (init) > > `(,(if (elt init 2) > > `(defvar ,(car init) nil ,(elt init 2)) > > `(defvar ,(car init) nil)) > > (make-variable-buffer-local ',(car init)))) > > (cdr c-lang-variable-inits)))) > > , (from cc-engine.el), the byte-compiler gives this warning: > > "Function `mapcan' from cl package called at runtime". > > It is clear that the mapcan, being within a ,@ construct, does its work > > at macro-expansion time, i.e. compile time. > > Thus the warning message is wrong. This is a bug. > This macro will be in the .elc. This means it can be called "at run > time" (e.g. if you do M-: (c-declare-lang-variables ...) RET). That brought a smile to my face. It's pure sophistry. :-) With no more creativity than you've just shown, ANY use of mapcan could be "shown" to be "use at runtime". So why not shorten the warning message to "Function `mapcan' from cl package was used" ? ;-) Or, perhaps you could indulge me a little, and show an example of mapcan (or some other cl function) which isn't "use at runtime". You know as well as I do, that there's no rigid separation of Lisp into compilation and running phases. I put it to you that that error message is not, in general, helpful. I think it should be restricted to uses of mapcan at runtime (in a defun) or when it's in the form generated by a macro. I'm trying to get rid of warnings messages in CC Mode. > Stefan -- Alan Mackenzie (Nuremberg, Germany).