Mail Archives: djgpp-workers/2001/11/19/02:50:16
On Mon, 2001-11-19 at 08:14, Vladimir Zhuchko wrote:
> On Fri, 16 Nov 2001 12:42:39 +0300, Vladimir Zhuchko
> <zhuchko AT sunhe DOT jinr DOT ru> wrote:
>
> 2. I found the problem under gcc302 compiler:
> The macros
> #define ITR(Time) itr->##Time
> is producing the Error message, under gcc2953 this is working well.
As would be expected - ## is only needed to glue two tokens together
(otherwise the preprocessor would not know whether or not it should
substitute something).
So if you have
#define ITR(Time) itr->m_##Time
the ## is required; with 'm_Time' the preprocessor would not know
it had to replace Time.
But in the case you describe, the -> ensures that using simply
#define ITR(Time) itr->Time
is unambiguous.
- Raw text -