From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Martin Stjernholm Newsgroups: gmane.emacs.devel Subject: Re: cc-vars.el Date: 19 Nov 2002 16:45:19 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5bwun97ecw.fsf@lister.roxen.com> References: <200211180057.JAA24537@etlken.m17n.org> <5bbs4m8qz9.fsf@lister.roxen.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037720732 3335 80.91.224.249 (19 Nov 2002 15:45:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 19 Nov 2002 15:45:32 +0000 (UTC) Cc: Dave Love , Kenichi Handa , rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EAYd-0000oA-00 for ; Tue, 19 Nov 2002 16:44:59 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18EAbP-0001yp-00 for ; Tue, 19 Nov 2002 16:47:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EAa6-0001EA-00; Tue, 19 Nov 2002 10:46:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EAZ8-0000Cf-00 for emacs-devel@gnu.org; Tue, 19 Nov 2002 10:45:30 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EAZ3-00005J-00 for emacs-devel@gnu.org; Tue, 19 Nov 2002 10:45:28 -0500 Original-Received: from godzilla.roxen.com ([194.52.182.190] helo=mail.roxen.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EAZ2-0008UG-00; Tue, 19 Nov 2002 10:45:25 -0500 Original-Received: from lister.roxen.com (lister.roxen.com [194.52.182.147]) by mail.roxen.com (Postfix) with ESMTP id BE8BE99AC; Tue, 19 Nov 2002 16:45:19 +0100 (MET) Original-To: Miles Bader In-Reply-To: Original-Lines: 33 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9546 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9546 Miles Bader wrote: > Martin Stjernholm writes: > > Dave Love wrote: > > > A change for that I once suggested greatly reduced the noise and I > > > don't think it's a big issue to re-write a few things to forms such a > > > compiler check would be documented to recognize. /.../ > E.g. when it sees (if (fboundp 'SYMBOL) ACTION ...), it could push > SYMBOL on a list of functions not to warn about, while it was compiling > ACTION. [other forms that macroexpand into `if' without modifying the > condition would work too] > > _That_ sort of change is pretty easy, and has the advantage of working > even with old compilers that don't special case it (they'll just emit a > warning like before, but the generated code will be the same). That's a good property. It can however be worked around anyway with something like this: (eval-when-compile (unless (fboundp 'bytecomp-nowarn-funbound) (defmacro bytecomp-nowarn-funbound (dummy form) form))) > [Think of it as a pragma expressed in code...] That's the problem; you can't get the pragma without getting the code then. E.g. if ACTION gets very large and I decide to split it up in several functions I had to add otherwise completely unnecessary fboundp checks in them just to silence the compiler. Your suggestion will work most of the time, but it still needs to be complemented with some pragma forms that doesn't have other effects.