From 1ec88ee0f1d5004d9b61938bcb5bd0d4bf6bd183 Mon Sep 17 00:00:00 2001 From: Jan Ole Vollmer Date: Thu, 8 Dec 2016 11:30:56 +0100 Subject: [PATCH] MSVC: disable warning C4201: nonstandard extension used : nameless struct/union --- glm/detail/type_vec1.hpp | 7 +++++++ glm/detail/type_vec2.hpp | 7 +++++++ glm/detail/type_vec3.hpp | 7 +++++++ glm/detail/type_vec4.hpp | 7 +++++++ glm/gtc/quaternion.hpp | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 0d54ae00..49ebce19 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -36,6 +36,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -57,6 +61,9 @@ namespace glm # endif//GLM_SWIZZLE*/ }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index d7f7c213..183bbdc7 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -35,6 +35,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -57,6 +61,9 @@ namespace glm }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 4fcb9643..3a01a3fc 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -35,6 +35,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -56,6 +60,9 @@ namespace glm # endif//GLM_SWIZZLE }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index c3923b4a..de812ed4 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -35,6 +35,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -58,6 +62,9 @@ namespace glm # endif//GLM_SWIZZLE }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 7a59702a..9f3e977a 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -48,6 +48,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -56,6 +60,9 @@ namespace glm typename detail::storage::value>::type data; }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif