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

Alexandre Oliva aoliva@redhat.com
Wed Jan 3 11:15:00 GMT 2001


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


More information about the Gcc mailing list