• 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
Shadowed variable warning when using blocks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shadowed variable warning when using blocks


  • Subject: Shadowed variable warning when using blocks
  • From: Stonewall Ballard <email@hidden>
  • Date: Sat, 30 Jan 2010 11:12:37 -0500

I like to enable the Hidden Local Variables (GCC_WARN_SHADOW) warning just in case I make a typo. Unfortunately, when using GCD blocks, I always get shadowing warnings for self and every other outer local variable used inside the blocks, e.g.
    "Declaration of 'self' shadows a previous local

I don't see any way to tag a variable to say that it's ok for it to shadow, and there's no way to avoid that with blocks.
Unless there is a way to suppress this now, I'd like to lobby for an addition to GCC that avoids the warning. Is that something I should file a bug report on, or is there some other place to do that?

Thanks.

 - Stoney

--
Stonewall Ballard
email@hidden           http://stoney.sb.org/

 _______________________________________________
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

  • Follow-Ups:
    • Re: Shadowed variable warning when using blocks
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: project structure for two-stage core data build
  • Next by Date: Re: Shadowed variable warning when using blocks
  • Previous by thread: Re: Property attribute in class continuation does not match class property
  • Next by thread: Re: Shadowed variable warning when using blocks
  • Index(es):
    • Date
    • Thread