Suppress -Winvalid-offsetof for PowerPC::PowerPCState

This code doesn't need to be portable (since the goal is to have a smaller offset for x64 codegen), so if it's not supported there are other problems. Similar code exists in e.g. DSP.cpp.
This commit is contained in:
Pokechu22 2023-02-02 14:44:59 -08:00
parent a88e5ef390
commit af5013b60f

View file

@ -223,8 +223,15 @@ struct PowerPCState
};
#if _M_X86_64
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Winvalid-offsetof"
#endif
static_assert(offsetof(PowerPC::PowerPCState, above_fits_in_first_0x100) <= 0x100,
"top of PowerPCState too big");
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
#endif
extern PowerPCState ppcState;