• 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: Compiler Warning - unknown Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler Warning - unknown Method


  • Subject: Re: Compiler Warning - unknown Method
  • From: Joe Osborn <email@hidden>
  • Date: Thu, 25 Aug 2005 11:45:40 -0500

Unfortunately, you can't always rely on this. For instance, if a method returns or takes as argument a non-object type, the compiler will sometimes generate incorrect code. Don't ignore the warning, fix it! Trust me, I have had bugs that have taken tens of minutes to track down simply due to the compiler misinterpreting a method call.

If you for some reason can't import a header, you can use a category to suppress the warning:

@interface ObjectToBeMessaged(WarningSuppression)
- dumb;
@end

At the top of your implementation file.

On Aug 25, 2005, at 07.22, Marco Maniscalco wrote:

Sometimes I send messages to objects which are not 'imported' directlly, but due to the fact that
function-resolving is done dynamically, the function gets called - all fine so far. Now here goes
my question:


How can I suppress > warning - no '-dumb' function found < ?
Is there a way to disable a _specific_ warning in gcc? (not all warnings)


(I know from other compilers than gcc a compiler-pragma like "#pragma nowarn:4532" e.g.)

Thanks in advance,
Marco Maniscalco
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Compiler Warning - unknown Method (From: Marco Maniscalco <email@hidden>)

  • Prev by Date: Re: Custom Title bars
  • Next by Date: Re: beginSheet simple question.
  • Previous by thread: Compiler Warning - unknown Method
  • Next by thread: Re: Compiler Warning - unknown Method
  • Index(es):
    • Date
    • Thread