From 666f7e3325ba568c9bb01c9b11fcdf816f76cda1 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Sun, 15 Jan 2017 09:50:53 -0800 Subject: [PATCH] Restrict struct warning suppression to clang only (#50) * Restrict struct warning suppression to clang only * Update changelist * Move gcc diagnostic pop inside header section --- HandmadeMath.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/HandmadeMath.h b/HandmadeMath.h index 1ce290d..5247fea 100644 --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -153,7 +153,6 @@ (*) Added HMM_NormalizeVec4 1.0 (*) Lots of testing! - 1.1 (*) Quaternion support (*) Added type hmm_quaternion @@ -170,6 +169,8 @@ (*) Added HMM_Slerp (*) Added HMM_QuaternionToMat4 (*) Added HMM_QuaternionFromAxisAngle + 1.1.1 + (*) Resolved compiler warnings on gcc and g++ LICENSE @@ -206,7 +207,8 @@ #pragma warning(disable:4201) #endif -#ifdef __GNUC__ +#ifdef __clang__ +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wgnu-anonymous-struct" #endif @@ -657,6 +659,10 @@ HMMDEF hmm_quaternion &operator/=(hmm_quaternion &Left, float Right); #endif /* HANDMADE_MATH_CPP */ +#ifdef __clang__ +#pragma GCC diagnostic pop +#endif + #endif /* HANDMADE_MATH_H */ #ifdef HANDMADE_MATH_IMPLEMENTATION