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#21963: Spurious byte compile message: "Warning: the function `bar' might not be defined at runtime." Date: Fri, 20 Nov 2015 15:26:38 +0000 Message-ID: <20151120152637.GD10389@acm.fritz.box> References: <20151120104419.GA10389@acm.fritz.box> <83wptc6hqg.fsf@gnu.org> <20151120114050.GC10389@acm.fritz.box> <83poz4682a.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448033136 20385 80.91.229.3 (20 Nov 2015 15:25:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2015 15:25:36 +0000 (UTC) Cc: 21963@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 20 16:25:22 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZznYq-00017q-Js for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2015 16:25:16 +0100 Original-Received: from localhost ([::1]:48093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZznYl-0000My-1A for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2015 10:25:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZznYg-0000LL-Dz for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 10:25:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZznYd-0000jp-AR for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 10:25:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZznYd-0000jl-7K for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 10:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZznYc-0003dm-TX for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2015 10:25:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Nov 2015 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21963 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21963-submit@debbugs.gnu.org id=B21963.144803310013981 (code B ref 21963); Fri, 20 Nov 2015 15:25:02 +0000 Original-Received: (at 21963) by debbugs.gnu.org; 20 Nov 2015 15:25:00 +0000 Original-Received: from localhost ([127.0.0.1]:46345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZznYa-0003dR-8x for submit@debbugs.gnu.org; Fri, 20 Nov 2015 10:25:00 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:35113) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZznYE-0003cv-V5 for 21963@debbugs.gnu.org; Fri, 20 Nov 2015 10:24:57 -0500 Original-Received: (qmail 58143 invoked by uid 3782); 20 Nov 2015 15:24:37 -0000 Original-Received: from acm.muc.de (p548A4FBE.dip0.t-ipconnect.de [84.138.79.190]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 20 Nov 2015 16:24:36 +0100 Original-Received: (qmail 11809 invoked by uid 1000); 20 Nov 2015 15:26:38 -0000 Content-Disposition: inline In-Reply-To: <83poz4682a.fsf@gnu.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108982 Archived-At: Hello, Eli. On Fri, Nov 20, 2015 at 04:48:13PM +0200, Eli Zaretskii wrote: > > Date: Fri, 20 Nov 2015 11:40:50 +0000 > > Cc: 21963@debbugs.gnu.org > > From: Alan Mackenzie > > > eval-when-compile has no effect at run time, and the warning is > > > explicitly about what might happen at runtime. > > > IOW, I don't think this is a bug. > > It is, at the very least, puzzling behaviour. The warning is issued for > > a function that most definitely has been defined at runtime. > No, it was not (or, more accurately, will not be). 'eval-when-compile' > does nothing to make sure it will be defined at runtime; you need > either 'require' or 'eval-and-compile'. The first two lines of the file are: (eval-when-compile (require 'warning-bar)) (require 'warning-bar) The second line will define the function `bar' at run time. The byte-compiler has already decided after the first line that `bar' is not defined at run time (fair enough), but seems unwilling to change its mind after the second line. This isn't just an academic problem. CC Mode uses such sequences (in effect), producing warnings in the Emacs build. -- Alan Mackenzie (Nuremberg, Germany).