• 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: Silencing deprecation warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silencing deprecation warnings


  • Subject: Re: Silencing deprecation warnings
  • From: Martin Wierschin <email@hidden>
  • Date: Wed, 7 Apr 2010 16:41:29 -0700

I recently needed to do the same thing. I found that adding this line to the source file did the trick:

#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

Just what I needed. For the archives, that #pragma must be used outside function scope.

I'm trying to get this working for code which imports legacy documents and uses deprecated Carbon calls, but haven't had any luck. I've placed the pragma at the very top of the file, eg:


#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/*
* copyrights and more
*/
#include <Carbon/Carbon.h>
...
OSStatus status = FMGetFontFamilyTextEncoding( fontFamily, &enc ); // deprecated warning still triggered


But no joy. I'm using XCode 3.3.1 / GCC 4.0. Am I doing something wrong?

~Martin

_______________________________________________
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


  • Follow-Ups:
    • Re: Silencing deprecation warnings
      • From: "Sean McBride" <email@hidden>
    • Re: Silencing deprecation warnings
      • From: Martin Wierschin <email@hidden>
References: 
 >Silencing deprecation warnings (From: Fritz Anderson <email@hidden>)
 >Re: Silencing deprecation warnings (From: Fritz Anderson <email@hidden>)

  • Prev by Date: llvm-g++-4.2 failed with exit code 1
  • Next by Date: Re: Silencing deprecation warnings
  • Previous by thread: Re: Silencing deprecation warnings
  • Next by thread: Re: Silencing deprecation warnings
  • Index(es):
    • Date
    • Thread