GNU bug report logs - #20457
compiler does not warn about arglist mismatch with obsolete alias

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Glenn Morris <rgm@HIDDEN>; dated Wed, 29 Apr 2015 07:09:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 20457 <at> debbugs.gnu.org:


Received: (at 20457) by debbugs.gnu.org; 28 May 2021 00:30:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 27 20:30:48 2021
Received: from localhost ([127.0.0.1]:53145 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lmQOm-0002ob-8E
	for submit <at> debbugs.gnu.org; Thu, 27 May 2021 20:30:48 -0400
Received: from quimby.gnus.org ([95.216.78.240]:48420)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lmQOl-0002jJ-4M
 for 20457 <at> debbugs.gnu.org; Thu, 27 May 2021 20:30:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3rkZdg0KDepYHDuW1UvqMBpQiae9niJnbFl+l1fOyHo=; b=OEQpD+Y9Gk82NBoiyale7k3JN4
 oVFAIqdLuu5VWnqofuW72AkIgLDDX2rVbP26IZj7OVBzsffaS5sPt+x7K+IEu5+VNQpvXfWnDy66C
 t7snUvtvx+U8yddx94bVCXX2gwmt07hKVHM6l5mwGi9P5XKoV3V0cAF3gaQEyzH3SwnE=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1lmQOc-0002Nz-SF; Fri, 28 May 2021 02:30:41 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#20457: compiler does not warn about arglist mismatch with
 obsolete alias
References: <i48udbxvhc.fsf@HIDDEN>
X-Now-Playing: The Residents's _The King & Eye: RMX_: "A Fool such as I"
Date: Fri, 28 May 2021 02:30:38 +0200
In-Reply-To: <i48udbxvhc.fsf@HIDDEN> (Glenn Morris's message of
 "Wed, 29 Apr 2015 03:08:15 -0400")
Message-ID: <871r9r3djl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Glenn Morris <rgm@HIDDEN> writes: > warns about oldfunc
 being
 obsolete: > > In blah: > foo.el:6:8:Warning: `oldfunc' is an obsolete function
 (as of 25.1); use > `newfunc' instead. > > however, it says nothing about
 blah calling oldfun [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 20457
Cc: 20457 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Glenn Morris <rgm@HIDDEN> writes:

> warns about oldfunc being obsolete:
>
>   In blah:
>   foo.el:6:8:Warning: `oldfunc' is an obsolete function (as of 25.1); use
>       `newfunc' instead.
>
> however, it says nothing about blah calling oldfunc with the wrong
> number of arguments, which leads to a runtime error.

The problem seems to be more general than that -- it doesn't warn about
the wrong number of arguments, ever, if using aliases?

Test case:

(defun foo ())
(defalias 'bar 'foo)
(defun zot ()
  (bar t))
(defun foobar ()
  (foo t))


----
Compiling file /tmp/warn.el at Fri May 28 02:26:55 2021

In foobar:
warn.el:6:4: Warning: foo called with 1 argument, but accepts only 0
----

Note -- no warning from the zot function.

It seems so odd that nobody has pointed this out before, so I'm
wondering if I'm just doing something obviously wrong in this test
case.  Anybody?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#20457; Package emacs. Full text available.

Message received at 20457 <at> debbugs.gnu.org:


Received: (at 20457) by debbugs.gnu.org; 8 Apr 2016 04:56:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 08 00:56:17 2016
Received: from localhost ([127.0.0.1]:53374 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aoOSv-0005UF-Dg
	for submit <at> debbugs.gnu.org; Fri, 08 Apr 2016 00:56:17 -0400
Received: from mail.mojserwer.eu ([195.110.48.8]:59305)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbork@HIDDEN>) id 1aoOSt-0005U6-3B
 for 20457 <at> debbugs.gnu.org; Fri, 08 Apr 2016 00:56:15 -0400
Received: from localhost (localhost [127.0.0.1])
 by mail.mojserwer.eu (Postfix) with ESMTP id E8F60A9FD9B;
 Fri,  8 Apr 2016 06:56:11 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu
Received: from mail.mojserwer.eu ([127.0.0.1])
 by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id CWxPpswPriYi; Fri,  8 Apr 2016 06:56:08 +0200 (CEST)
Received: from localhost (98-171.echostar.pl [213.156.98.171])
 by mail.mojserwer.eu (Postfix) with ESMTPSA id BDE49A9FD98;
 Fri,  8 Apr 2016 06:56:08 +0200 (CEST)
From: Marcin Borkowski <mbork@HIDDEN>
To: Glenn Morris <rgm@HIDDEN>
Subject: Re: bug#20457: compiler does not warn about arglist mismatch with
 obsolete alias
References: <i48udbxvhc.fsf@HIDDEN>
Date: Fri, 08 Apr 2016 06:56:01 +0200
In-Reply-To: <i48udbxvhc.fsf@HIDDEN> (Glenn Morris's message of
 "Wed, 29 Apr 2015 03:08:15 -0400")
Message-ID: <87vb3spula.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20457
Cc: 20457 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On 2015-04-29, at 03:08, Glenn Morris <rgm@HIDDEN> wrote:

> Package: emacs
> Version: 24.5
>
> Byte-compiling the following:
>     
>     (defun newfunc ()
>       t)
>     
>     (eval-and-compile
>       (define-obsolete-function-alias 'oldfunc 'newfunc "25.1"))
>     
>     (defun blah ()
>       (oldfunc t))
>
> warns about oldfunc being obsolete:
>   
>   In blah:
>   foo.el:6:8:Warning: `oldfunc' is an obsolete function (as of 25.1); use
>       `newfunc' instead.
>
> however, it says nothing about blah calling oldfunc with the wrong
> number of arguments, which leads to a runtime error.

Confirmed on GNU Emacs 25.1.50.8 (1e8cd05).

Best,

-- 
Marcin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#20457; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Apr 2015 07:08:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 29 03:08:18 2015
Received: from localhost ([127.0.0.1]:55483 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YnM6U-0007xS-9W
	for submit <at> debbugs.gnu.org; Wed, 29 Apr 2015 03:08:18 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:35277 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1YnM6S-0007xK-Df
 for submit <at> debbugs.gnu.org; Wed, 29 Apr 2015 03:08:16 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.71)
 (envelope-from <rgm@HIDDEN>)
 id 1YnM6R-0002Z4-Co; Wed, 29 Apr 2015 03:08:15 -0400
From: Glenn Morris <rgm@HIDDEN>
To: submit <at> debbugs.gnu.org
Subject: compiler does not warn about arglist mismatch with obsolete alias
X-Spook: bootleg NWO arrangements SP4 fissionable AK-47 Echelon RSA
X-Ran: 7[XUc)>HCGmrj+pR#zb(m{6}4K)9b^.]Aj*J#%jpH~YE\p6y(YX)Kr04~+LtSr5?SM|fc^
X-Hue: magenta
X-Debbugs-No-Ack: yes
X-Attribution: GM
Date: Wed, 29 Apr 2015 03:08:15 -0400
Message-ID: <i48udbxvhc.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Package: emacs
Version: 24.5

Byte-compiling the following:
    
    (defun newfunc ()
      t)
    
    (eval-and-compile
      (define-obsolete-function-alias 'oldfunc 'newfunc "25.1"))
    
    (defun blah ()
      (oldfunc t))

warns about oldfunc being obsolete:
  
  In blah:
  foo.el:6:8:Warning: `oldfunc' is an obsolete function (as of 25.1); use
      `newfunc' instead.

however, it says nothing about blah calling oldfunc with the wrong
number of arguments, which leads to a runtime error.




Report forwarded to bug-gnu-emacs@HIDDEN:
bug#20457; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 28 May 2021 00:45:01 UTC

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