Re: __FUNCTION__ and debug.

From: Francesco Chemolli <kinkie-ml@dont-contact.us>
Date: 05 Nov 2002 09:00:36 +0100

Robert Collins <robertc@squid-cache.org> writes:

> On Mon, 2002-10-28 at 10:36, Henrik Nordström wrote:
> > On 28 Oct 2002, Robert Collins wrote:
> >
> > > Trace behaves similarly, although I've made it be trace (section, level,
> > > "format", ....); which is aesthetically more pleasing for me.
> >
> > Ah, you are using a macro varargs.... your initial message used the same
> > syntax as for debug() which got me slightly confused..
>
> Even if we use the same syntax as for debug, we still need macro varargs
> or something similar.
>
> > Note: As far as I know macro varargs is a GCC extension, not a standard
> > language construct.. do not expect code written with macro varargs
> > constructs to be very portable to other compilers than GCC.
>
> Hmm, is there a canonical site we can research this on?

Why not just using a function and hinting the compiler to inline it?
Inline-hints are less intrusive than macro varargs (BTW: I used macro
varargs for the debug-messages in some helpers, with #ifdef trickery to
fall back to not emitting the debug messages if I wasn't sure that the
compiler supported them - more a style exercise than something useful, but
still...)

-- 
	kinkie (kinkie-ml [at] libero [dot] it)
	Random fortune, unrelated to the message:
"An anthropologist at Tulane has just come back from a field trip to New 
Guinea with reports of a tribe so primitive that they have Tide but not 
new Tide with lemon-fresh Borax."
-- David Letterman
Received on Tue Nov 05 2002 - 00:59:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:18:37 MST