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: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 29 Apr 2004 08:03:20 +0200
At 12:02 Uhr -0400 28.04.2004, Randall Meadows wrote:
[foo withBar:&var]
will produce a discarding qualifier warning becuase foo normally
takes a (*) and pass a reference (&).
Ummm... nnnnooooo? "&" is the "address-of" operator. So, you're
passing a pointer, just as "*" indicates in a function's signature.
There are no references in straight C, only in C++, and as references
work transparently, there's no "reference-to" operator anyway, even
in C++.
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.
Qualifiers are things like the "register", "volatile" or "const"
keywords. So, if you have a function that takes a non-const
parameter, and you pass it a const pointer, you'll probably get this
warning. (pre-coffee-reply -- maybe it's the other way round, but you
get the idea)
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.