Re: Enable Objective-C exception handling. [-fobjc-exceptions] causes additional warnings on pointers?
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.