• 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: #pragma doesn't
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: #pragma doesn't


  • Subject: Re: #pragma doesn't
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 24 Dec 2009 12:55:34 -0800

On Dec 24, 2009, at 08:48, Keary Suska wrote:

> On Dec 24, 2009, at 8:56 AM, Charlie Dickman wrote:
>
>> Yes, it does but, according to the documentation, it doesn't have to.
>
> Perhaps it's debatable, but the docs state "this pragma may appear anywhere within the variables' scopes", which implies that it should.
>
> In any case, you will need to show where your variable is declared as well as the complete method or block for which the warning is showing, and where the #pragma is specified.

Or give the non-answer answer, which is that it's easier to use "__unused" than #pragma:

	__unused  someType someVariable;

It's actually a #define to '__attribute__((__unused__))', so I think it can go anywhere in the declaration.

I don't *know* that clang supports this attribute too, but I think it does.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >#pragma doesn't (From: Charlie Dickman <email@hidden>)
 >Re: #pragma doesn't (From: Keary Suska <email@hidden>)
 >Re: #pragma doesn't (From: Charlie Dickman <email@hidden>)
 >Re: #pragma doesn't (From: Keary Suska <email@hidden>)

  • Prev by Date: Connecting an NSProgressIndicator -- SOLVED
  • Next by Date: Re: Utilizing OTHER_CFLAGS properly?
  • Previous by thread: Re: #pragma doesn't
  • Next by thread: Connecting an NSProgressIndicator
  • Index(es):
    • Date
    • Thread