GNU bug report logs -
#12299
24.1; no byte compiler warning for inline function call with too few arguments
Previous Next
Reported by: "Roland Winkler" <winkler <at> gnu.org>
Date: Wed, 29 Aug 2012 02:16:02 UTC
Severity: normal
Tags: confirmed
Found in version 24.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 12299 <at> debbugs.gnu.org (full text, mbox):
> diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
> index 341643c7d1..ad9f827171 100644
> --- a/lisp/emacs-lisp/byte-opt.el
> +++ b/lisp/emacs-lisp/byte-opt.el
> @@ -274,6 +274,7 @@ byte-compile-inline-expand
> ((pred byte-code-function-p)
> ;; (message "Inlining byte-code for %S!" name)
> ;; The byte-code will be really inlined in byte-compile-unfold-bcf.
> + (byte-compile--check-arity-bytecode form fn)
> `(,fn ,@(cdr form)))
Hmm... wouldn't we want the warning to be emitted if the source code was itself
of the form constructed by `(,fn ,@(cdr form))?
IOW I think we want that `byte-compile--check-arity-bytecode` call to be
elsewhere (in the code that actually compiles the code constructed by
`(,fn ,@(cdr form))).
Also, as a general rule I think we should try and refrain from emitting
warnings from the code in byte-opt.el (warnings should be independent
from optimizations).
> - `(,(symbol-function name) ,@(cdr form))))
> + (let ((bc (symbol-function name)))
> + (byte-compile--check-arity-bytecode form bc)
> + `(,bc ,@(cdr form)))))
I think the same holds here.
Stefan
This bug report was last modified 3 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.