• 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
@synchronized produces warning on messages to super
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@synchronized produces warning on messages to super


  • Subject: @synchronized produces warning on messages to super
  • From: Jonathan del Strother <email@hidden>
  • Date: Wed, 25 Jan 2006 15:54:29 +0000

I found an oddity in @synchronized() behaviour - it produces warnings on any messages to super that appear after the @synchronized directive. As a trivial (and nonsensical) example :

[super retainCount];
@synchronized(@"blah") {}
[super retainCount];


The first retainCount call is fine - no warnings reported.
The second is tagged with "Warning: invalid receiver type '_objc_super *'"



Doesn't matter what message is sent to super - I always get that warning if it occurs after a @synchronized in the current function.



Is this a bug in the compiler? A known problem? Or some weird subtlety that I'm not aware of?



Jon

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: @synchronized produces warning on messages to super
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Re: NSUserDefaults & thread safety
  • Next by Date: Re: NSView setFrameSize
  • Previous by thread: Re: NSView setFrameSize
  • Next by thread: Re: @synchronized produces warning on messages to super
  • Index(es):
    • Date
    • Thread