• 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: How does the compiler figure out conflicting return types, and why no warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does the compiler figure out conflicting return types, and why no warnings?


  • Subject: Re: How does the compiler figure out conflicting return types, and why no warnings?
  • From: "Jonathan del Strother" <email@hidden>
  • Date: Wed, 12 Dec 2007 13:08:22 +0000

On Dec 12, 2007 1:02 PM, Alastair Houghton <email@hidden> wrote:
> On 12 Dec 2007, at 12:43, Jonathan del Strother wrote:
>
> > I get no warnings no matter what warning switches I turn on, yet the
> > code fails miserably at runtime : the compiler is expecting
> > [disclosure rotation] to return a float (presumably from the -[NSEvent
> > rotation] message), so we get garbage data in the return value.
> >
> > Obviously there's no way for the compiler to really know what to do
> > here, since 'disclosure' is of type id, and there's at least two
> > methods called 'rotation' with differing return types.  But shouldn't
> > we at least get a warning?
>
> I'm sure they've added a warning for this in Xcode 3.  Which version
> of Xcode/GCC are you using?

Xcode 3.0, with gcc 4.0.1.  I get no warnings on a brand new project
with default build settings.


Thanks for the other suggestions.
 _______________________________________________
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

References: 
 >How does the compiler figure out conflicting return types, and why no warnings? (From: "Jonathan del Strother" <email@hidden>)
 >Re: How does the compiler figure out conflicting return types, and why no warnings? (From: Alastair Houghton <email@hidden>)

  • Prev by Date: Re: pragma nowarn
  • Next by Date: Re: pragma nowarn
  • Previous by thread: Re: How does the compiler figure out conflicting return types, and why no warnings?
  • Next by thread: How to uninstall xcode 2.5
  • Index(es):
    • Date
    • Thread