• 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
GCC Standard Predefined Macros
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GCC Standard Predefined Macros


  • Subject: GCC Standard Predefined Macros
  • From: Richard Somers <email@hidden>
  • Date: Fri, 7 Dec 2007 09:49:47 -0700

The following simplified line of code complied fine on Xcode 2.x in my cocoa application.

    char *file = basename(__FILE__)

Xcode 3.0 complies the code with the following error: warning: passing argument 1 of "basename" discards qualifiers from pointer target type.

__FILE__ is a C string or a pointer to char so why the error message?

The following Apple link doesn't seem shed any light.

    http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/cpp/Standard-Predefined-Macros.html

I have check on the web and can't seem to find any thing relevant.

Any ideas?

Regards,
Richard
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GCC Standard Predefined Macros
      • From: Richard Somers <email@hidden>
    • Re: GCC Standard Predefined Macros
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Help diagnosing memory problem
  • Next by Date: Re: Imaginary File Path
  • Previous by thread: Removing layer-backed NSViews
  • Next by thread: Re: GCC Standard Predefined Macros
  • Index(es):
    • Date
    • Thread