In Xcode, at the project level I have the following setting; Xcode setting to suppress deprecated function warning
This adds -Wno-deprecated-declarations to compilation which I can verify from Report Navigator. Also when I try to use a deprecated function no warning is raised.
I want to suppress this warning within a single file so I used #pragma as follows;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wno-deprecated-declarations"
deprecated_function_call();
#pragma clang diagnostic pop
This code gives the following compilation error; error: unknown warning group '-Wno-deprecated-declarations', ignored [-Werror,-Wunknown-pragmas]
pragma clang diagnostic ignored "-Wno-deprecated-declarations"
How is it possible that compiler can use this warning flag and I cannot in my pragmas.
My clang version; Apple LLVM version 8.0.0 (clang-800.0.36.1)