Description
I have come across an issue where certain third party header files generates the following error, when included in C++26 projects:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h:96:18 Invalid bitwise operation between different enumeration types ('CGImageAlphaInfo' and 'CGImageComponentInfo')
Trying to disable diagnostics using the following pragmas does not work:
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wenum-conversion"
#include <Cocoa/Cocoa.h>
#pragma clang diagnostic pop
Sample test project for Xcode 26: Test.zip
I realise Apple uses their own custmised clang, but i'm speculating they pull most of core features/bugfixes from upstream llvm-project
. I've also raised an issue with Apple, but I have not gotten a response. There is also a related issue #92340, but not sure what the outcome was for this.
If there is a work-around to disable the aforementioned enum diagnostics for third-party or system headers included in C++26 projects, that would be appreciated.