Re: __attribute__ in Objective-C
Re: __attribute__ in Objective-C
- Subject: Re: __attribute__ in Objective-C
- From: "Timothy J. Wood" <email@hidden>
- Date: Fri, 21 Oct 2005 08:20:01 -0700
On Oct 21, 2005, at 4:45 AM, Alexander v. Below wrote:
[...]
How do I use the gcc "__attribute__" (1)correctly in a Objective-C
declaration?
[...]
Sadly, you can't -- __attribute__ isn't part of the ObjC syntax
(that is, you can't apply it to classes, protocols, methods, ivars,
etc. -- it still works on plain C in a .m file).
I hacked a copy of the compiler once upon a time to support printf-
style format checking on +[NSString initWithFormat:] and friends and
had to add this to the grammar. Since then, the compiler's parser
has moved from flex/bison to a hand written parser (at least, I think
this is integrated in the 4.1 tree; not sure).
-tim
_______________________________________________
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