This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: `Cpp: 'ICOM_FN(##xfn)' generates a warning :-(


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.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]