emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cc-vars.el


From: Martin Stjernholm
Subject: Re: cc-vars.el
Date: 19 Nov 2002 16:45:19 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Miles Bader <address@hidden> wrote:

> Martin Stjernholm <address@hidden> writes:
> > Dave Love <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]