bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20457: compiler does not warn about arglist mismatch with obsolete a


From: Lars Ingebrigtsen
Subject: bug#20457: compiler does not warn about arglist mismatch with obsolete alias
Date: Fri, 28 May 2021 02:30:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Glenn Morris <rgm@gnu.org> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]