[cfe-dev] __func__ should be of type char[], not char*
Chris Lattner
clattner at apple.com
Sat Jan 12 11:33:17 PST 2008
>> Steve/Fariborz, is __func__ valid in an objc method?
>
> __func__ refers to synthesized method name. For example in:
>
> @interface I
> - (int) Meth;
> @end
>
> __func__ will refer to:
>
> "-[I Meth]"
Ok, is __FUNCTION__ and __PRETTY_FUNCTION__ also allowed? If so, this
is close to the right patch I think:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080107/003747.html
The problem is that it only reserves space for "foo:bar:". If you
know how to get the right length, please fix :)
-Chris
More information about the cfe-dev
mailing list