[Top][All Lists]

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

Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA))

From: Trevor Morris
Subject: Re: HAVE_INLINE (Re: [gnugo-devel] engine/influence.c (and DFA))
Date: Fri, 06 Sep 2002 16:11:53 -0400

At 07:04 PM 9/3/2002 +0200, Arend Bayer wrote:
>On Tue, 3 Sep 2002, Marco Scheurer wrote:
>> Speaking of micro optimizations and speed/space trade offs, I've been
>> wondering...
>I've been wondering about using inline. I guess all compilers that we
>care much about support inline as an extension. Hence we could write
>a configure test to define HAVE_INLINE or (similar to
>HAVE_VARIADIC_...), and then do
>(The GCC manual suggests using __inline__ for ANSI-conformant use of
>inline. I have no idea how portable that would be.)

I'm all in favor of replacing the macros w/ GG_INLINE function calls.
Note, however, for Microsoft VC++:
  The compiler cannot inline a function if:
     * The function has a variable argument list. 
     * The program takes the address of the function. 

In particular, replacing the TRACE macros w/ inline functions is 
probably not a good idea.

Though, I believe the following construct may work for the TRACE
macros on all platforms:

#define TRACE  (!verbose) ? (void)0 : gprintf

(Originally suggested by Dave Denholm in: )


reply via email to

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