Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@earthlink.net>
Subject: Re: Different Lint Preprocessor
Date: Wed, 31 Jul 2002 19:04:35 GMT	[thread overview]
Message-ID: <m3ado7kba6.fsf@salmon.parasoft.com> (raw)
In-Reply-To: ai8g32$60p$1@news1.Radix.Net

Thomas Dickey <dickey@saltmine.radix.net> writes:

> Joe Blow <mrsincerity@hotmail.com> wrote:
> 
> > #define func(type, fmt, args...)    \
> >            func( type, __FUNCTION__, __LINE__, fmt, ## args)
> 
> > Under GNU this is valid syntax, but alas under cc/cpp it is not
> > recognized and generates a tonne of warnings.
> 
> yes, it's a shame that gcc has this bug, and that some people write
> code that depends upon it.

Especially given that you can achieve the same thing with
minimal increase in typing and still be standard-compliant:

  #if defined(__GNUC__)
    #define __HERE__ __FUNCTION__, __FILE__, __LINE__
  #else
    #define __HERE__ __FILE__, __LINE__
  #endif
  ...

     func(type, __HERE__, "%d %d", 1, 2);

Cheers,
-- 
In order to understand recursion you must first understand recursion.


  reply	other threads:[~2002-07-31 19:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 19:01 Different Lint Preprocessor Joe Blow
2002-07-31 11:01 ` Thomas Dickey
2002-07-31 19:04   ` Paul Pluzhnikov [this message]
2002-08-01 10:00     ` Thomas Dickey
2002-08-05 14:21       ` Ed Vogel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox