Historical environment: macOS 11.4 and Xcode 12.5.
After upgrading macOS and Xcode, an older Cocos project failed with an error indicating that argument value 10880 was outside the valid range.
Double-click the compiler diagnostic to open the failing expression.
![Opening the compiler error]()
Select
bt_splat_ps, then choose Jump to Definition.![Jumping to the macro definition]()
Follow its expansion to
bt_pshufd_psand then to the compiler intrinsic or macro receiving the invalid immediate value.![Following the nested macro]()
![Range diagnostic at the expanded value]()
The original workaround changed the constant to fit the newly enforced range:


Before adopting such a change, compare the affected third-party library against its upstream Xcode 12 compatibility patch. An intrinsic’s immediate value encodes behavior; merely forcing it into range may compile while changing the algorithm. Prefer upgrading the engine/library or applying a documented upstream patch, and add a test for the code path. Keep local vendor changes in a patch file because regenerated project or dependency files can overwrite them.
The workaround resolved this diagnostic but exposed another build problem afterward, so it was not a complete project-level fix.



