• 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
predefined __FUNCTION__ and __func__ macros...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

predefined __FUNCTION__ and __func__ macros...


  • Subject: predefined __FUNCTION__ and __func__ macros...
  • From: "Ivan S. Kourtev" <email@hidden>
  • Date: Mon, 13 Jun 2005 16:59:41 -0400

...or should I say, C-language extensions?

Hello,

I have lots of code that assumed __FUNCTION__ is a string literal. Perhaps it was my mistake to do so, but it seemed to work just fine until GCC 4.0 in Xcode 2.0 came around. Now it seems __FUNCTION__ is not a literal anymore ( it is a variable according to http:// developer.apple.com/documentation/DeveloperTools/gcc-4.0.0/gcc/ Function-Names.html#Function-Names ).

I am getting confused because according to http://developer.apple.com/ documentation/DeveloperTools/gcc-3.3/gcc/Function-Names.html#Function- Names __FUNCTION__ was not a literal in 3.3 either yet it has been working under 3.3 for me.

Can I turn some flags to re-enable the "literal" behavior or should I go and fix the code? Thanks for any help.

--
ivan

P.S. Basically, where @__FUNCTION__ used to work, now I have to go and change it to [NSString stringWithCString:__FUNCTION__]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Prev by Date: Re: Notification for Service
  • Next by Date: Mouse Events on NSMatrix and NSButtonCells
  • Previous by thread: Re: Cocoa-Java-based Universal Binary?
  • Next by thread: Spotlight Importer for files in "Project-Based" folder
  • Index(es):
    • Date
    • Thread