This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: potential preprocessor bug in latest g++?
- To: David Howells <David dot Howells at nexor dot co dot uk>
- Subject: Re: potential preprocessor bug in latest g++?
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 27 Jul 2000 18:24:22 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <200007271056.HAA19219@cacau.lsd.ic.unicamp.br>
On Jul 27, 2000, David Howells <David.Howells@nexor.co.uk> wrote:
> gccquery.cpp:16:30: warning: pasting would not give a valid preprocessing token
The warning is appropriate. `foo::IBar' is not a valid token. `foo',
`::' and `iBar' are three separate tokens. Pasting them together is
wrong.
> #define DECLARE_COM_TRAITS(NAMESPACE,CLASS) \
> struct com_if_traits<NAMESPACE ## CLASS> { \
> static inline const IID& GetIID() { return NAMESPACE ## IID_##CLASS; } \
> }
> DECLARE_COM_TRAITS(foo::,IBar);
--
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