Subject: bug#12299: 24.1; no byte compiler warning for inline function call with too few arguments

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 16 Aug 2019 15:46:52 -0700

"Roland Winkler" <[email-masked]> writes:

> cat > foo.el << EOF
> (defsubst foo (a b))
> (foo t)
> EOF
>
> Byte-compile the above file. The Emacs 24.1 byte compiler does not
> complain that the inline function foo is called with too few arguments.

I can confirm that this bug is still present in Emacs 27, but it's weird
that this hasn't come up more often.  I mean, defsubsts are commonly
used, and not having byte compilation warnings about the wrong number of
arguments is something you'd expect to come up more often.

> Emacs 23.1 complains
>
>   foo.el:2:1:Warning: attempt to open-code `anonymous lambda' with
>     too few arguments
>
> till it aborts with
>
>   foo.el:2:1:Error: Variable binding depth exceeds max-specpdl-size
>
> which I do not find very appropriate either.

Nope.

I tried briefly to follow the logic in the stuff that'd give a "attempt
to open-code", but it doesn't seem to be triggered at all in this case.

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