From af5013b60fe10215351a913ef14abe9cc4f0b23d Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 2 Feb 2023 14:44:59 -0800 Subject: [PATCH] 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. --- Source/Core/Core/PowerPC/PowerPC.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/Core/PowerPC/PowerPC.h b/Source/Core/Core/PowerPC/PowerPC.h index c125ca9b22..53697cd0ef 100644 --- a/Source/Core/Core/PowerPC/PowerPC.h +++ b/Source/Core/Core/PowerPC/PowerPC.h @@ -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;