predefined __FUNCTION__ and __func__ macros...
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