• 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: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?


  • Subject: Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 28 Apr 2004 12:02:12 -0400

At 8:21 AM -0700 4/28/04, Ken Hawkins wrote:

when i enable this for REAL exception syntax i get additional warnings coming up now concerning the folllowing:

SomeType var;

[foo withBar:&var]

will produce a discarding qualifier warning becuase foo normally takes a (*) and pass a reference (&). this is normal syntax and does not generate warnings with -fobjc-exceptions flag turned off. why is the exception flag causing this behavior? has anyone else seen this?

I have seen this, passing an AppleEventPtr, which has no qualifiers at all, generates these types of warnings. I asked about it and got no response.

I fixed it by moving the declaration of the variable inside the @try block, as in:

@try {
AppleEvent aeReply;
...
// The following line would generate the bogus warning if
// aeReply was declared outside the try block.
[self unmount:&aeReply];
...
} @catch
...

--
randy

There are three kinds of men:
Those who learn by reading.
Those who learn by observation.
And those who just have to pee on the electric fence for themselves.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
      • From: Andrew Pinski <email@hidden>
References: 
 >Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers? (From: Ken Hawkins <email@hidden>)

  • Prev by Date: Trying to display an NSButtonCell mixed state using binding
  • Next by Date: Re: Cocoa Bindings, NSMatrix, setting programmatically
  • Previous by thread: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
  • Next by thread: Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
  • Index(es):
    • Date
    • Thread