From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: rgm@gnu.org, Lars Ingebrigtsen <larsi@gnus.org>, 20457@debbugs.gnu.org
Subject: bug#20457: compiler does not warn about arglist mismatch with obsolete alias
Date: Sat, 05 Jun 2021 11:54:35 -0400 [thread overview]
Message-ID: <jwvlf7oxq9x.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83cztb8jc0.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 May 2021 09:26:39 +0300")
>> 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?
The byte-compiler's tracking of functions arity is quite limited, yes.
Patches to improve it are welcome.
Stefan
prev parent reply other threads:[~2021-06-05 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 7:08 bug#20457: compiler does not warn about arglist mismatch with obsolete alias Glenn Morris
2016-04-08 4:56 ` Marcin Borkowski
2021-05-28 0:30 ` Lars Ingebrigtsen
2021-05-28 6:26 ` Eli Zaretskii
2021-06-05 15:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvlf7oxq9x.fsf-monnier+emacs@gnu.org \
--to=bug-gnu-emacs@gnu.org \
--cc=20457@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.