Re: Silencing deprecation warnings
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