• 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: Lawrence Gold <email@hidden>
  • Date: Tue, 5 Jul 2005 11:10:56 -0600

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: changeword
      • From: Orson Bushnell <email@hidden>
References: 
 >changeword (From: Luciano Mattiacci <email@hidden>)

  • Prev by Date: Re: Spurious linker errors in dependent projects
  • Next by Date: Re: Header search path with XCode 2.1
  • Previous by thread: changeword
  • Next by thread: Re: changeword
  • Index(es):
    • Date
    • Thread