The pragma is GCC specific so other compilers will either raise warnings for it (hereby undoing the original goal of the pragma) or simply error out. If the pragma must be used, can ```#pragma GCC diagnostic push``` at least go inside the ```#if __clang__``` ?