From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#30499: 26.0.91; Compiler warning cannot be suppressed Date: Tue, 06 Mar 2018 09:06:12 -0500 Message-ID: <87y3j51ep7.fsf@gmail.com> References: <85606vbx34.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1520345128 30425 195.159.176.226 (6 Mar 2018 14:05:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2018 14:05:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 30499@debbugs.gnu.org, f.j.wright@live.co.uk To: Francis Wright Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 06 15:05:24 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etDDR-0006Vq-DV for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 15:05:17 +0100 Original-Received: from localhost ([::1]:56057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etDFU-0003iM-4v for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Mar 2018 09:07:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etDFC-0003be-CI for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 09:07:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etDF8-0006Dl-AN for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 09:07:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39038) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etDF8-0006DW-6l for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 09:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1etDF7-0007ca-WD for bug-gnu-emacs@gnu.org; Tue, 06 Mar 2018 09:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Mar 2018 14:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30499 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30499-submit@debbugs.gnu.org id=B30499.152034518229248 (code B ref 30499); Tue, 06 Mar 2018 14:07:01 +0000 Original-Received: (at 30499) by debbugs.gnu.org; 6 Mar 2018 14:06:22 +0000 Original-Received: from localhost ([127.0.0.1]:46935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etDEU-0007bb-Jz for submit@debbugs.gnu.org; Tue, 06 Mar 2018 09:06:22 -0500 Original-Received: from mail-io0-f176.google.com ([209.85.223.176]:40829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etDES-0007bH-8F; Tue, 06 Mar 2018 09:06:20 -0500 Original-Received: by mail-io0-f176.google.com with SMTP id v6so22148259iog.7; Tue, 06 Mar 2018 06:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=2GYAaRY2cnfFTToVtv+ke4KluWEfUemlncYPHPunXDw=; b=toXxehYtE9cpzL7C1QWz5nc9Ox0MPKLzptmH2VEN+PiYVNv5rYG79T7pMzgkNN4xl+ 5qL3PhcYbigGKtmG6vvwFi2E85KSGKNx8tvGkeg7kmghJVI/DWpIFYOHHmeEO/eM9nx0 6E/rQIBQv3H2+Rd2/eoRGG2/uWVn9NTcGGGfN24A0WDVQBBRnwCIIlO1sJMDat/cDZaB Kb+zeUsD1NQWkwVXe3MEIFkQlB60b8ANruutQnHr7PsiNYZ4R0PaQMObHLDxl3J8bzcj Q07+sMxPcsq3/RVYvwAEJe2Be75tsOGae5orkGdJ1J/X8mwfWoXeUcMPi2/OrCbKhs+J SuVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=2GYAaRY2cnfFTToVtv+ke4KluWEfUemlncYPHPunXDw=; b=O9BIcgRU7TT5j8JJGQQTrOatX5cqmZmFqiUnfCXn+LNIMvN4ln7yebn5rBj69Rf4ek QpoBUVNPoW0HlGR/qV2Un9dtUFzIujCLaNXY+3+qrTrxmbeHiiyU30L3ffyJWRtOQQzE G7tCI6USkAqhbWBVVF1B/AJxvRAzYiyYFHxz8zHlSebZtsTX8MaqbS2HjIeQYGGicRZw 7BKooNWjHpW04N0q4AMCq9IhGQIVvzpIda55qniIrdAjXtUDfClRM3uol2NNg5ysKyBu fY4Q2QrpRs4ojXnk4w7HAjsCp/7YO/ISOUyasXvfpAqmwgV3yYh6v35uivHXWmMvrBNa 9bTA== X-Gm-Message-State: APf1xPAU955vN3KT4to8U7T2osGNhiwQo0llRMPti6cCF0OoHU8BZO5e uhYPUyCO2FGfr89tPWEqxArwpw== X-Google-Smtp-Source: AG47ELtvMuwcneIlf5WG+dHmg1vGewM3zKTuob5yCLpkmprWI9Q8Ai+4CcpcYldQi0SUIbZyTa5NNg== X-Received: by 10.107.200.142 with SMTP id y136mr22740556iof.155.1520345174595; Tue, 06 Mar 2018 06:06:14 -0800 (PST) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id q21sm2038017itb.2.2018.03.06.06.06.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Mar 2018 06:06:14 -0800 (PST) In-Reply-To: <85606vbx34.fsf@gmail.com> (Francis Wright's message of "Sat, 17 Feb 2018 12:49:03 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143954 Archived-At: found 30499 24.3 quit Francis Wright 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: =E2=80=98:foo=E2=80=99 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.