From af38a5c41ab3d989af6d630d2cfcf0c8ac500d31 Mon Sep 17 00:00:00 2001 From: Elias Daler Date: Sun, 22 Jul 2018 19:05:13 +0300 Subject: [PATCH] Ignore GCC warning (-Wclass-memaccess) in imgui.h (#1959) --- imgui.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/imgui.h b/imgui.h index 59590f0b..6665025b 100644 --- a/imgui.h +++ b/imgui.h @@ -36,7 +36,7 @@ // Helpers #ifndef IM_ASSERT -#include +#include #define IM_ASSERT(_EXPR) assert(_EXPR) // You can override the default assert handler by editing imconfig.h #endif #if defined(__clang__) || defined(__GNUC__) @@ -52,6 +52,9 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" +#elif defined(__GNUC__) && __GNUC__ >= 8 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wclass-memaccess" #endif // Forward declarations @@ -1922,6 +1925,8 @@ struct ImFont #if defined(__clang__) #pragma clang diagnostic pop +#elif defined(__GNUC__) && __GNUC__ >= 8 +#pragma GCC diagnostic pop #endif // Include imgui_user.h at the end of imgui.h (convenient for user to only explicitly include vanilla imgui.h)