Re: Methods with the same name but different return types
Re: Methods with the same name but different return types
- Subject: Re: Methods with the same name but different return types
- From: Sean McBride <email@hidden>
- Date: Mon, 06 Jun 2011 13:05:09 -0400
- Organization: Rogue Research Inc.
On Sat, 4 Jun 2011 08:26:33 +0200, Andreas Grosam said:
>There are two compiler switches (warnings) related to "signature
>overload" problems:
>
>"Strict Selector Matching"
>GCC_WARN_STRICT_SELECTOR_MATCH, -Wstrict-selector-match
>
>"Multiple Definition Types for Selector"
>GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR, -Wselector
>
>
>In Xcode 4, both are disabled by default when creating from a template
>project.
>
>As Eyal experienced, there is in fact the possibility to break existing
>code, when compiling with a newer SDK. So IMO, it wouldn't hurt if these
>switches are on by default.
GCC_WARN_STRICT_SELECTOR_MATCH should probably be on by default, but
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR is off by default (I
imagine) because amongst Apple's own APIs there are many methods with
the same name but different return types, and you'll get lots of warnings.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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