• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: changeword
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changeword


  • Subject: Re: changeword
  • From: Orson Bushnell <email@hidden>
  • Date: Wed, 6 Jul 2005 11:26:34 -0600

Have you tried:
    #define TCL_NEW(name, init)    new    name init

Orson Bushnell


On Jul 5, 2005, at 11:10, Lawrence Gold wrote:

On Jul 5, 2005, at 7:59 AM, Luciano Mattiacci wrote:


Help ,

I am porting a CodeWarrior project to Xcode.

In my project I use the macro :

    #define TCL_NEW(name,init)    new        name##init

the CW compiles it with success when init is () :

    TCL_NEW(CArray,())    =>    CArray()

Xcode does not compile it , but Xcode produces the error :

error: pasting "CArray" and "(" does not give a valid preprocessing token


If I'm reading the documentation correctly, this sort of concatenation is not supported by the ANSI/ISO standard. From http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.0/ cpp/Concatenation.html:


"However, two tokens that don't together form a valid token cannot be pasted together. For example, you cannot concatenate x with + in either order."

In your case, you may be able to simply use

    TCL_NEW(CArray,)

to get around the problem.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40access4less.net


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >changeword (From: Luciano Mattiacci <email@hidden>)
 >Re: changeword (From: Lawrence Gold <email@hidden>)

  • Prev by Date: Re: Xcode 2.1 debugger hanging at breakpoint
  • Next by Date: Re: Weird ending error XCode 2.1
  • Previous by thread: Re: changeword
  • Next by thread: changeword
  • Index(es):
    • Date
    • Thread