From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francois Gouget To: Alexandre Oliva Cc: gcc@gcc.gnu.org Subject: Re: `Cpp: 'ICOM_FN(##xfn)' generates a warning :-( Date: Wed, 03 Jan 2001 15:52:00 -0000 Message-id: References: X-SW-Source: 2001-01/msg00148.html On 3 Jan 2001, Alexandre Oliva wrote: > On Jan 3, 2001, Francois Gouget wrote: > > > Is there any other way I could avoid the prescan? > > Neil suggested using a varargs macro argument, introduced in C99 and > supported by CVS GCC. > > #define DECLARE2(xfn,...) void ICOM_FN(xfn ## __VA_ARGS__) (void) > > One solution that appears to work with old and new version of GCC is: > > #define DECLARE2(xfn,rest...) void ICOM_FN(xfn ## rest) (void) > > But the use of the ISO C99-compliant solution is encouraged. Ah! I did not think about it that way. That works. I'm not overly enthusisatic about using vararg macros though. The problem is it's hard to make them work across compilers (not that Wine's code is extremely protable to start with but we try still). Oh well, we'll duplicate the definitions. It's not that bad. Thanks a lot for your help! -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Avoid the Gates of Hell - use Linux.