From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#6740: Spurious byte compiler warnings Date: Wed, 18 Nov 2020 20:25:56 -0800 Message-ID: References: <20100727200619.GC2280@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24419"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Dan Nicolaescu , Alan Mackenzie , 6740@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 19 05:27:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfbXJ-0006GE-3n for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Nov 2020 05:27:09 +0100 Original-Received: from localhost ([::1]:56394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfbXI-0001kg-5l for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Nov 2020 23:27:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kfbXC-0001kK-BZ for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 23:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kfbXB-0001Dj-Vj for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 23:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kfbXB-0003rX-QV for bug-gnu-emacs@gnu.org; Wed, 18 Nov 2020 23:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Nov 2020 04:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6740 X-GNU-PR-Package: emacs Original-Received: via spool by 6740-submit@debbugs.gnu.org id=B6740.160575996814774 (code B ref 6740); Thu, 19 Nov 2020 04:27:01 +0000 Original-Received: (at 6740) by debbugs.gnu.org; 19 Nov 2020 04:26:08 +0000 Original-Received: from localhost ([127.0.0.1]:37487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfbWG-0003qA-Pa for submit@debbugs.gnu.org; Wed, 18 Nov 2020 23:26:08 -0500 Original-Received: from mail-ej1-f42.google.com ([209.85.218.42]:41198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfbWE-0003pL-EM for 6740@debbugs.gnu.org; Wed, 18 Nov 2020 23:26:03 -0500 Original-Received: by mail-ej1-f42.google.com with SMTP id gj5so5956175ejb.8 for <6740@debbugs.gnu.org>; Wed, 18 Nov 2020 20:26:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=6FMNB6oqEEIr7plNReAEPDCLros+ZREFuXllrYKFtw8=; b=MqZT2ynqC+Xa7VFYTEbzhYTpAMqqmU+FufFlVAN9/Kj6I6UsOQwTSox8wI1THXTD3C MLeEeH9j21a7KqcVCnt9K69pjxEOlpoHz3xpIa/isLcBv+mdEI1PgP7nAYcChljXUGhD 43xNkZbsZpUhnSho0Lfq7bQeHjhTuXUxRbGXr61+vGvKmus2LuG00PF2RDrzAdLd1I7d J6dCus8GypaL/tuaQc4aZCAt140prtlDsLO5xT0X9RdnlKn0D+0ZTmPD4JvUfpH8Xuyh CMHmMnDtS82reH5DJvdYzzi5Iw1Rij4JlRmQ2brGCmqBIAw5MjLICK10mrmFlre5o4hQ g9CA== X-Gm-Message-State: AOAM5309P0iV4YovLPfcwUCqFUCIz1krxf5Lk6KaE9xW6tDjx+T2ajq8 btJQv9Fjc/QtYY1SNskk1FTBjj7Sv3uEGqVpWpZA9n0Z/UI= X-Google-Smtp-Source: ABdhPJyGe7a1uXG3UgOUFN+GNGtIMp++jGBaL3M67xsNk2PjcpG3AepqhUz3gjepcyN3JCsGo01xEv6xq7XeyCsK0tE= X-Received: by 2002:a17:906:a00c:: with SMTP id p12mr28086190ejy.249.1605759956804; Wed, 18 Nov 2020 20:25:56 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 18 Nov 2020 20:25:56 -0800 In-Reply-To: (Stefan Monnier's message of "Tue, 27 Jul 2010 23:40:50 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193691 Archived-At: Stefan Monnier writes: >>> Warning: value returned from (featurep (quote cc-fix)) is unused >>> Warning: value returned from (featurep (quote cc-fix)) is unused >>> >>> It is obvious that that value is indeed used. This is a bug. > >> The byte compiler knows that (featurep 'xemacs) is false, so >> (and (not (featurep 'cc-fix)) ... ) >> will be false, so the featurep result is indeed unused. > >> If you use (and (featurep 'xemacs) (not (featurep 'cc-fix) ... >> the warning will go away. > > It's one of those cases where the warning is the result of a check done > "too late" (i.e. after some optimization), which means the check is not > performed on the code the user sees, but on some massaged version of it. > It's difficult to avoid them, short of removing all "code > improvement" warnings. (That was 10 years ago.) I think this is a very minor issue that is likely not worth spending any time on. In any case, it's not even clear what the fix would be or if a different behavior would improve the situation. Does anyone object to closing this as wontfix?