GNU bug report logs -
#30499
26.0.91; Compiler warning cannot be suppressed
Previous Next
Reported by: f.j.wright <at> live.co.uk
Date: Sat, 17 Feb 2018 12:50:02 UTC
Severity: minor
Tags: fixed
Found in versions 26.0.91, 24.3
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30499 in the body.
You can then email your comments to 30499 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30499
; Package
emacs
.
(Sat, 17 Feb 2018 12:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
f.j.wright <at> live.co.uk
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 17 Feb 2018 12:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(with-no-warnings (byte-compile '(:foo)))
produces the warning
Warning: ‘:foo’ called as a function
Setting byte-compile-warnings to nil also does not suppress this
warning. So either the documentation or the operation of both
with-no-warnings and byte-compile-warnings is incorrect.
In fact, it seems a little inconsistent to me that none of
(defun :foo ())
(byte-compile ':foo)
(:foo)
produces any warning, but compiling the call of :foo does produce a
warning.
In GNU Emacs 26.0.91 (build 1, x86_64-w64-mingw32)
of 2018-01-23 built on MONOLITH
Windowing system distributor 'Microsoft Corp.', version 10.0.16299
Recent messages:
Type C-x 1 to delete the help window.
Complete, but not unique
Making completion list...
Complete, but not unique
Making completion list... [2 times]
Mark set [5 times]
Making completion list...
Type C-x 1 to delete the help window.
Type "q" in help window to restore its previous buffer.
Configured using:
'configure --prefix=/d/emacs/emacs-26.0.91 --without-imagemagick
--without-dbus'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS LCMS2
Important settings:
value of $LANG: ENG
locale-coding-system: cp1252
Major mode: Lisp Interaction
Minor modes in effect:
flyspell-mode: t
shell-dirtrack-mode: t
show-paren-mode: t
delete-selection-mode: t
electric-pair-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
horizontal-scroll-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils warnings cl-extra compile eieio-opt speedbar sb-image ezimage
dframe find-func help-fns radix-tree help-mode cl-print debug flyspell
ispell imenu tramp tramp-compat tramp-loaddefs trampver ucs-normalize
shell pcomplete comint ansi-color ring parse-time format-spec advice
paren delsel cus-start cus-load finder-inf info package easymenu
epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib elec-pair server time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 258989 13496)
(symbols 56 25373 1)
(miscs 48 138 312)
(strings 32 46389 1599)
(string-bytes 1 1286336)
(vectors 16 41749)
(vector-slots 8 788352 12686)
(floats 8 86 527)
(intervals 56 584 25)
(buffers 992 17))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30499
; Package
emacs
.
(Tue, 06 Mar 2018 14:07:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 30499 <at> debbugs.gnu.org (full text, mbox):
found 30499 24.3
quit
Francis Wright <francis.j.wright <at> gmail.com> writes:
> (with-no-warnings (byte-compile '(:foo)))
I think it should rather be like this (shows the same warning):
(byte-compile (lambda () (with-no-warnings (:foo))))
> produces the warning
>
> Warning: ‘:foo’ called as a function
Seems to have been the case at least as far back as 24.3, and probably
farther.
> Setting byte-compile-warnings to nil also does not suppress this
> warning. So either the documentation or the operation of both
> with-no-warnings and byte-compile-warnings is incorrect.
I think the warning is just missing a `byte-compile-warning-enabled-p'
check:
--- i/lisp/emacs-lisp/bytecomp.el
+++ w/lisp/emacs-lisp/bytecomp.el
@@ -3128,7 +3128,8 @@ byte-compile-form
(when (assq var byte-compile-lexical-variables)
(byte-compile-report-error
(format-message "%s cannot use lexical var `%s'" fn var))))))
- (when (macroexp--const-symbol-p fn)
+ (when (and (byte-compile-warning-enabled-p 'suspicious)
+ (macroexp--const-symbol-p fn))
(byte-compile-warn "`%s' called as a function" fn))
(when (and (byte-compile-warning-enabled-p 'interactive-only)
interactive-only)
> In fact, it seems a little inconsistent to me that none of
>
> (defun :foo ())
>
> (byte-compile ':foo)
>
> (:foo)
>
> produces any warning, but compiling the call of :foo does produce a
> warning.
Maybe (byte-compile (lambda () (defun :foo ()))) should give a warning,
though I don't see why the others should.
bug Marked as found in versions 24.3.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Mar 2018 14:07:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30499
; Package
emacs
.
(Sun, 11 Mar 2018 02:09:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 30499 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 30499 fixed
close 30499 27.1
quit
[Message part 2 (message/rfc822, inline)]
Thanks!
[Message part 3 (text/plain, inline)]
I pushed the fix to master.
[1: fda58fbc24]: 2018-03-10 19:51:25 -0500
Fix wrong behavior of 'outline-headers-as-kill' command (Bug#30209)
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fda58fbc245a3f6f6722261ffb2e2262231bd4ea
Added tag(s) fixed.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 11 Mar 2018 02:09:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
30499 <at> debbugs.gnu.org and f.j.wright <at> live.co.uk
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Sun, 11 Mar 2018 02:09:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 08 Apr 2018 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 75 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.