• 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
Re: __attribute__ in Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >__attribute__ in Objective-C (From: "Alexander v. Below" <email@hidden>)

  • Prev by Date: Re: NSBezierPath containsPoint?
  • Next by Date: Altering Cocoa Text Word Breaking
  • Previous by thread: __attribute__ in Objective-C
  • Next by thread: Re: __attribute__ in Objective-C
  • Index(es):
    • Date
    • Thread