This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: `Cpp: 'ICOM_FN(##xfn)' generates a warning :-(
- To: Francois Gouget <fgouget at free dot fr>
- Subject: Re: `Cpp: 'ICOM_FN(##xfn)' generates a warning :-(
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 03 Jan 2001 17:15:18 -0200
- Cc: gcc at gcc dot gnu dot org, jakub at redhat dot com
- Organization: GCC Team, Red Hat
- References: <Pine.LNX.4.21.0101031013200.24424-100000@amboise.dolphin>
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