delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/11/19/02:50:16

Subject: Re: (fwd) Re: GCC3.02XXX
From: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
To: djgpp-workers AT delorie DOT com
In-Reply-To: <hachvto0a900t8msgera469ii4akg28n5m@4ax.com>
References: <hachvto0a900t8msgera469ii4akg28n5m AT 4ax DOT com>
X-Mailer: Evolution/0.99.0+cvs.2001.11.06.15.07 (Preview Release)
Date: 19 Nov 2001 08:44:36 +0100
Message-Id: <1006155877.22310.0.camel@bender.falconsoft.be>
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019