How to disable specific deprecation warning
How to disable specific deprecation warning
- Subject: How to disable specific deprecation warning
- From: "B.J. Buchalter" <email@hidden>
- Date: Thu, 15 Apr 2010 15:29:15 -0400
Hi Folks,
I have an app that I am building against the current MacOS SDK that
uses CoreAudio.
There is a deprecated API that has been replaced by a newer API. The
newer API is available in 10.5 and newer. I have written my code so
that if the new API is available via weak-linking, it is used, but I
have to include calls to the deprecated API on the codepath that
executes if the new API is not available in order for the code to run
on older OSes.
Now, when I compile my app, I get deprecation warnings for the
deprecated calls. That is expected. But since I know that they are
deprecated and I am using them in my compatibility path, I would like
to mark those calls as "OK" so that I do not get spurious warnings
from the compiler.
I googled this and found that I can use:
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
before the routine that uses the deprecated functions, but that does
not seem to work for the x86_64 build -- I still get the warnings from
the compiler when it is building for x86_64.
Any ideas?
Thanks!
B.J. Buchalter
Metric Halo
http://www.mhlabs.com
_______________________________________________
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