From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,9de647ceb9cdd1df X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-07-31 12:04:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Newsgroups: comp.unix.tru64 Subject: Re: Different Lint Preprocessor References: <45467788.0207301101.4fa9b000@posting.google.com> From: Paul Pluzhnikov Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 31 Jul 2002 19:04:35 GMT NNTP-Posting-Host: 24.205.78.167 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1028142275 24.205.78.167 (Wed, 31 Jul 2002 12:04:35 PDT) NNTP-Posting-Date: Wed, 31 Jul 2002 12:04:35 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.unix.tru64:8268 Thomas Dickey writes: > Joe Blow 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.