This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problems with macros
- From: John Love-Jensen <eljay at adobe dot com>
- To: <Alexander dot Schmid at RSD dot rohde-schwarz dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Wed, 11 Dec 2002 08:18:33 -0600
- Subject: Re: Problems with macros
Hi Alex,
I'm betting that Microsoft is the one that's not quite compliant.
It works if you have a two-stage macro:
g++ -E -c test.cpp
--- test.cpp ---
#define T(x) L ## x
#define R(x) T(x)
R(__FILE__)
--- end-of-file---
Voila! Twiddle with the macro names as appropriate, and you shouldn't need
to change any of your existing source code.
--Eljay
(I hate macros.)