• 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: Cocoa-dev Digest, Vol 2, Issue 1504
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 2, Issue 1504


  • Subject: Re: Cocoa-dev Digest, Vol 2, Issue 1504
  • From: Theo Vosse <email@hidden>
  • Date: Fri, 21 Oct 2005 21:48:47 +0200

How do I use the gcc "__attribute__" (1)correctly in a Objective-C
declaration?

I use a different trick, but your mileage may vary, of course. In the makefile or preprocessor definitions, I define "UNUSED(x)=(void)x;". Then, in the code between the local declarations and the start of the body, I would write


- (IBAction) test:(id)sender
{
    int x;
    UNUSED(sender);

    /* code here */
}

Works for all C dialects and all compilers I use(d).

    Theo
_______________________________________________
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: Saving the rows order of a table view
  • Next by Date: Objective C++: 'not a member'
  • Previous by thread: Re: Saving the rows order of a table view
  • Next by thread: Objective C++: 'not a member'
  • Index(es):
    • Date
    • Thread