`Cpp: 'ICOM_FN(##xfn)' generates a warning :-(
Francois Gouget
fgouget@free.fr
Wed Jan 3 15:52:00 GMT 2001
On 3 Jan 2001, Alexandre Oliva wrote:
> On Jan 3, 2001, Francois Gouget <fgouget@free.fr> 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.
More information about the Gcc
mailing list