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#11918: 24.1; Spurious bytecomp warning "might not be defined at runtime" when using advice in required file Date: Wed, 25 Nov 2015 10:25:05 +0000 Message-ID: <20151125102505.GA2142@acm.fritz.box> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1448447071 12681 80.91.229.3 (25 Nov 2015 10:24:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 10:24:31 +0000 (UTC) Cc: 11918-done@debbugs.gnu.org To: Michael Hoffman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 11:24:15 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 1a1XFE-0004YW-JK for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 11:24:12 +0100 Original-Received: from localhost ([::1]:44244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XFF-0004ni-Cb for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 05:24:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XF8-0004lb-Ay for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 05:24:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1XF5-0001Hy-25 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 05:24:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1XF4-0001Hs-V2 for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 05:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1a1XF4-0005y1-KP for bug-gnu-emacs@gnu.org; Wed, 25 Nov 2015 05:24:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Nov 2015 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 11918 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 11918@debbugs.gnu.org, acm@muc.de, b3i4old02@sneakemail.com Original-Received: via spool by 11918-done@debbugs.gnu.org id=D11918.144844698522862 (code D ref 11918); Wed, 25 Nov 2015 10:24:02 +0000 Original-Received: (at 11918-done) by debbugs.gnu.org; 25 Nov 2015 10:23:05 +0000 Original-Received: from localhost ([127.0.0.1]:52073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1XE8-0005wf-WC for submit@debbugs.gnu.org; Wed, 25 Nov 2015 05:23:05 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:51786) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a1XE6-0005w6-37 for 11918-done@debbugs.gnu.org; Wed, 25 Nov 2015 05:23:03 -0500 Original-Received: (qmail 83622 invoked by uid 3782); 25 Nov 2015 10:23:00 -0000 Original-Received: from acm.muc.de (p5B146B74.dip0.t-ipconnect.de [91.20.107.116]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 25 Nov 2015 11:23:00 +0100 Original-Received: (qmail 2690 invoked by uid 1000); 25 Nov 2015 10:25:05 -0000 Content-Disposition: inline In-Reply-To: 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:109224 Archived-At: Hello, Michael. Sorry it's taken a long time to get back to you. On Wed, Jul 11, 2012 at 04:39:58PM -0700, Michael Hoffman wrote: > Please describe exactly what actions triggered the bug, and > the precise symptoms of the bug. If you can, give a recipe > starting from `emacs -Q': > ==== > cat > outer.el << EOF > (eval-when-compile (add-to-list 'load-path ".")) > (require 'inner) > EOF > cat > inner.el << EOF > (defun inner-b ()) > (defadvice inner-b (around inner-b-1 activate) > (inner-a)) > (defun inner-a ()) > (provide 'inner) > EOF > emacs -Q -batch -f batch-byte-compile outer.el > ==== > This produces: > ==== > In end of data: > outer.el:4:1:Warning: the function `inner-a' might not be defined at runtime. > Wrote /net/noble/vol2/home/mmh1/src/experimental/bytecode/outer.elc > ==== > I expected not to have a warning in this case as inner-a, is, in fact defined. First of all, thanks for taking the trouble to report the problem, and thanks even more for distilling it down to a minimal case. What is happening is that the byte-compiler collects a list of defuns "not yet defined for runtime" as it goes along. This includes any functions defined within an `eval-when-compile', here the function `inner-a' mentioned in the `defadvice'. When `inner-a' is later defined, it is NOT taken off this list. This is the bug. The contents of that list are get output to the screen in the "might not be defined at runtime" warning message at the end of the compilation. The bug has just been fixed in the Emacs project's git repository, in branch emacs-25. We should be releasing Emacs 25.1 several months from now, probably in early summer 2016. [ .... ] > In GNU Emacs 24.1.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.18.9) > of 2012-06-21 on rhel6-x64.grid.gs.washington.edu > Windowing system distributor `Red Hat, Inc.', version 11.0.11004000 > Configured using: > `configure '--without-gif' '--with-x' '--with-x-toolkit=gtk' > '--prefix=/net/gs/vol3/software/modules-sw/emacs/24.1/Linux/RHEL6/x86_64' > 'LDFLAGS=-L/net/gs/vol3/software/modules-sw/boost/1.45.0/Linux/RHEL6/x86_64/lib/ > -L/net/gs/vol3/software/modules-sw/R/2.9.0/Linux/RHEL6/x86_64/lib/' > 'CPPFLAGS=-I/net/gs/vol3/software/modules-sw/boost/1.45.0/Linux/RHEL6/x86_64/include/ > -I/net/gs/vol3/software/modules-sw/R/2.9.0/Linux/RHEL6/x86_64/include/'' [ .... ] -- Alan Mackenzie (Nuremberg, Germany).