From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20457: compiler does not warn about arglist mismatch with obsolete alias Date: Fri, 28 May 2021 09:26:39 +0300 Message-ID: <83cztb8jc0.fsf@gnu.org> References: <871r9r3djl.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rgm@gnu.org, 20457@debbugs.gnu.org To: Lars Ingebrigtsen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 28 08:27:08 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmVxc-0001qq-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 May 2021 08:27:08 +0200 Original-Received: from localhost ([::1]:36736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmVxb-0003TJ-F7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 May 2021 02:27:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmVxW-0003TA-02 for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 02:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41939) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmVxV-0001fq-P5 for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 02:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lmVxV-0001Ok-M2 for bug-gnu-emacs@gnu.org; Fri, 28 May 2021 02:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 May 2021 06:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20457 X-GNU-PR-Package: emacs Original-Received: via spool by 20457-submit@debbugs.gnu.org id=B20457.16221832055351 (code B ref 20457); Fri, 28 May 2021 06:27:01 +0000 Original-Received: (at 20457) by debbugs.gnu.org; 28 May 2021 06:26:45 +0000 Original-Received: from localhost ([127.0.0.1]:53485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmVxF-0001OF-Dn for submit@debbugs.gnu.org; Fri, 28 May 2021 02:26:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmVxD-0001O1-To for 20457@debbugs.gnu.org; Fri, 28 May 2021 02:26:44 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:48830) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmVx8-0001MT-8P; Fri, 28 May 2021 02:26:38 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3290 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmVx3-0004uj-90; Fri, 28 May 2021 02:26:34 -0400 In-Reply-To: <871r9r3djl.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 28 May 2021 02:30:38 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207441 Archived-At: > From: Lars Ingebrigtsen > Date: Fri, 28 May 2021 02:30:38 +0200 > Cc: 20457@debbugs.gnu.org > > Glenn Morris 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? Stefan?