From eb20cdc6ae1105ce5ec1aa00698577dd314dacd0 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 02:17:25 +0200 Subject: [PATCH 01/11] Added precision qualifier tests --- glm/detail/precision.hpp | 22 +++++++++++----------- test/gtc/gtc_type_aligned.cpp | 8 ++++++++ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/glm/detail/precision.hpp b/glm/detail/precision.hpp index 8b1e2929..d3ced27f 100644 --- a/glm/detail/precision.hpp +++ b/glm/detail/precision.hpp @@ -7,17 +7,17 @@ namespace glm { enum precision { - highp, - mediump, - lowp, aligned_highp, aligned_mediump, aligned_lowp, - packed_highp = highp, - packed_mediump = mediump, - packed_lowp = lowp, - packed = packed_highp, + packed_highp, + packed_mediump, + packed_lowp, aligned = aligned_highp, + packed = packed_highp, + highp = packed_highp, + mediump = packed_mediump, + lowp = packed_lowp, # ifdef GLM_FORCE_ALIGNED defaultp = aligned_highp # else @@ -27,26 +27,26 @@ namespace glm namespace detail { - template + template struct is_aligned { static const bool value = false; }; template<> - struct is_aligned + struct is_aligned { static const bool value = true; }; template<> - struct is_aligned + struct is_aligned { static const bool value = true; }; template<> - struct is_aligned + struct is_aligned { static const bool value = true; }; diff --git a/test/gtc/gtc_type_aligned.cpp b/test/gtc/gtc_type_aligned.cpp index 303b7aec..202cc6fd 100644 --- a/test/gtc/gtc_type_aligned.cpp +++ b/test/gtc/gtc_type_aligned.cpp @@ -1,6 +1,14 @@ +#define GLM_MESSAGES #define GLM_FORCE_ALIGNED #include +GLM_STATIC_ASSERT(glm::detail::is_aligned::value, "aligned_lowp is not aligned"); +GLM_STATIC_ASSERT(glm::detail::is_aligned::value, "aligned_mediump is not aligned"); +GLM_STATIC_ASSERT(glm::detail::is_aligned::value, "aligned_highp is not aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned::value, "packed_highp is aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned::value, "packed_mediump is aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned::value, "packed_lowp is aligned"); + struct my_vec4_packed { glm::uint32 a; From b3d57f2cc92acaadd01c05aa69a8c842f27bb102 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 03:06:58 +0200 Subject: [PATCH 02/11] Improved aligned types support --- glm/detail/setup.hpp | 4 ++++ glm/detail/type_vec.hpp | 29 +++++++++++++++++++++++++++-- glm/detail/type_vec1.hpp | 2 +- glm/detail/type_vec2.hpp | 2 +- glm/detail/type_vec3.hpp | 2 +- glm/detail/type_vec4.hpp | 2 +- glm/gtc/quaternion.hpp | 2 +- test/gtc/gtc_type_aligned.cpp | 9 ++++++--- 8 files changed, 42 insertions(+), 10 deletions(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 2cfa97a9..889c7cab 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -647,6 +647,10 @@ # define GLM_EXPLICIT #endif +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_HAS_ALIGNED_TYPE GLM_HAS_UNRESTRICTED_UNIONS + /////////////////////////////////////////////////////////////////////////////////// // Length type diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index 99aa4d48..82e4ba01 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -16,7 +16,7 @@ namespace detail uint8 data[size]; } type; }; -/* + template struct storage { @@ -24,7 +24,7 @@ namespace detail uint8 data[size]; } type; }; -*/ + # if GLM_ARCH & GLM_ARCH_SSE2_BIT template <> struct storage @@ -43,6 +43,31 @@ namespace detail { typedef glm_uvec4 type; }; +/* +# else + typedef union __declspec(align(16)) glm_128 + { + unsigned __int8 data[16]; + } glm_128; + + template <> + struct storage + { + typedef glm_128 type; + }; + + template <> + struct storage + { + typedef glm_128 type; + }; + + template <> + struct storage + { + typedef glm_128 type; + }; +*/ # endif # if (GLM_ARCH & GLM_ARCH_AVX_BIT) diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index d757abb1..ea25ba44 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -27,7 +27,7 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS && (defined(GLM_SWIZZLE) || (GLM_ARCH & (GLM_ARCH_SSE2_BIT | GLM_ARCH_NEON_BIT))) +# if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wpedantic" diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index e07ab389..331782dd 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -26,7 +26,7 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS && (defined(GLM_SWIZZLE) || (GLM_ARCH & (GLM_ARCH_SSE2_BIT | GLM_ARCH_NEON_BIT))) +# if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wpedantic" diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 80086679..64e159d8 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -26,7 +26,7 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS && (defined(GLM_SWIZZLE) || (GLM_ARCH & (GLM_ARCH_SSE2_BIT | GLM_ARCH_NEON_BIT))) +# if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wpedantic" diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 887e497a..dcd59dd5 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -27,7 +27,7 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS && (defined(GLM_SWIZZLE) || (GLM_ARCH & (GLM_ARCH_SSE2_BIT | GLM_ARCH_NEON_BIT))) +# if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wpedantic" diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index b4762a87..6a42bdf3 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -40,7 +40,7 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS && (defined(GLM_SWIZZLE) || (GLM_ARCH & (GLM_ARCH_SSE2_BIT | GLM_ARCH_NEON_BIT))) +# if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wpedantic" diff --git a/test/gtc/gtc_type_aligned.cpp b/test/gtc/gtc_type_aligned.cpp index 202cc6fd..e2d7005d 100644 --- a/test/gtc/gtc_type_aligned.cpp +++ b/test/gtc/gtc_type_aligned.cpp @@ -21,7 +21,9 @@ struct my_vec4_aligned glm::uint32 a; glm::aligned_vec4 b; }; -GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct"); +#if GLM_HAS_ALIGNED_TYPE + GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct"); +#endif struct my_dvec4_packed { @@ -35,7 +37,6 @@ struct my_dvec4_aligned glm::uint64 a; glm::aligned_dvec4 b; }; -//FIXME //GLM_STATIC_ASSERT(sizeof(my_dvec4_aligned) == sizeof(glm::aligned_dvec4) * 2, "glm::dvec4 aligned is not correct"); struct my_ivec4_packed @@ -50,7 +51,9 @@ struct my_ivec4_aligned glm::uint32 a; glm::aligned_ivec4 b; }; -GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct"); +#if GLM_HAS_ALIGNED_TYPE + GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct"); +#endif struct my_u8vec4_packed { From ad1ae4506675ce5ac958fa946b5a2a4bcf49bcdb Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 03:18:19 +0200 Subject: [PATCH 03/11] More use of GLM_HAS_ALIGNED_TYPE --- glm/detail/type_vec4.inl | 2 +- glm/gtc/quaternion.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 00320835..d891e038 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -970,6 +970,6 @@ namespace detail } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE # include "type_vec4_simd.inl" #endif diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 60cae12f..ff610980 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -795,7 +795,7 @@ namespace detail } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE # include "quaternion_simd.inl" #endif From 8c8c8367e3b2d11ec9fe3553a41650d427a0e3cf Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 03:37:24 +0200 Subject: [PATCH 04/11] Improved aligned types support --- glm/detail/precision.hpp | 49 ++++++++++++++++++++--------------- glm/ext.hpp | 4 ++- glm/gtc/type_aligned.hpp | 16 ++++++++++++ test/gtc/gtc_type_aligned.cpp | 22 ++++++++++------ 4 files changed, 61 insertions(+), 30 deletions(-) diff --git a/glm/detail/precision.hpp b/glm/detail/precision.hpp index d3ced27f..7980dbdc 100644 --- a/glm/detail/precision.hpp +++ b/glm/detail/precision.hpp @@ -7,18 +7,23 @@ namespace glm { enum precision { - aligned_highp, - aligned_mediump, - aligned_lowp, packed_highp, packed_mediump, packed_lowp, - aligned = aligned_highp, - packed = packed_highp, + +# if GLM_HAS_ALIGNED_TYPE + aligned_highp, + aligned_mediump, + aligned_lowp, + aligned = aligned_highp, +# endif + highp = packed_highp, mediump = packed_mediump, lowp = packed_lowp, -# ifdef GLM_FORCE_ALIGNED + packed = packed_highp, + +# if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED) defaultp = aligned_highp # else defaultp = highp @@ -33,22 +38,24 @@ namespace detail static const bool value = false; }; - template<> - struct is_aligned - { - static const bool value = true; - }; +# if GLM_HAS_ALIGNED_TYPE + template<> + struct is_aligned + { + static const bool value = true; + }; - template<> - struct is_aligned - { - static const bool value = true; - }; + template<> + struct is_aligned + { + static const bool value = true; + }; - template<> - struct is_aligned - { - static const bool value = true; - }; + template<> + struct is_aligned + { + static const bool value = true; + }; +# endif }//namespace detail }//namespace glm diff --git a/glm/ext.hpp b/glm/ext.hpp index 59476b0a..dee032e3 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -50,6 +50,9 @@ #include "./gtc/type_ptr.hpp" #include "./gtc/ulp.hpp" #include "./gtc/vec1.hpp" +#if GLM_HAS_ALIGNED_TYPE +# include "./gtc/type_aligned.hpp" +#endif #include "./gtx/associated_min_max.hpp" #include "./gtx/bit.hpp" @@ -95,7 +98,6 @@ #endif #include "./gtx/transform.hpp" #include "./gtx/transform2.hpp" -#include "./gtx/type_aligned.hpp" #include "./gtx/vector_angle.hpp" #include "./gtx/vector_query.hpp" #include "./gtx/wrap.hpp" diff --git a/glm/gtc/type_aligned.hpp b/glm/gtc/type_aligned.hpp index 14603434..d143bcf3 100644 --- a/glm/gtc/type_aligned.hpp +++ b/glm/gtc/type_aligned.hpp @@ -1,5 +1,21 @@ /// @ref gtc_type_aligned /// @file glm/gtc/type_aligned.hpp +/// +/// @see core (dependence) +/// +/// @defgroup gtc_type_aligned GLM_GTC_type_aligned +/// @ingroup gtc +/// +/// @brief Aligned types. +/// need to be included to use these features. + +#if !GLM_HAS_ALIGNED_TYPE +# error "GLM: Aligned types are not supported on this platform" +#endif + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_type_aligned extension included") +#endif #pragma once diff --git a/test/gtc/gtc_type_aligned.cpp b/test/gtc/gtc_type_aligned.cpp index e2d7005d..351a3958 100644 --- a/test/gtc/gtc_type_aligned.cpp +++ b/test/gtc/gtc_type_aligned.cpp @@ -1,5 +1,7 @@ #define GLM_MESSAGES -#define GLM_FORCE_ALIGNED +#include + +#if GLM_HAS_ALIGNED_TYPE #include GLM_STATIC_ASSERT(glm::detail::is_aligned::value, "aligned_lowp is not aligned"); @@ -21,9 +23,7 @@ struct my_vec4_aligned glm::uint32 a; glm::aligned_vec4 b; }; -#if GLM_HAS_ALIGNED_TYPE - GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct"); -#endif +GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct"); struct my_dvec4_packed { @@ -51,9 +51,7 @@ struct my_ivec4_aligned glm::uint32 a; glm::aligned_ivec4 b; }; -#if GLM_HAS_ALIGNED_TYPE - GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct"); -#endif +GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct"); struct my_u8vec4_packed { @@ -92,7 +90,6 @@ int test_copy() return Error; } - int main() { int Error = 0; @@ -110,3 +107,12 @@ int main() return Error; } + +#else + +int main() +{ + return 0; +} + +#endif//GLM_HAS_ALIGNED_TYPE From 4ab97767567a45bb7230b135772a7c64c427e961 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 03:43:56 +0200 Subject: [PATCH 05/11] Fixed build error --- test/gtx/gtx_io.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/gtx/gtx_io.cpp b/test/gtx/gtx_io.cpp index 8b0b12fa..a7ab7a76 100644 --- a/test/gtx/gtx_io.cpp +++ b/test/gtx/gtx_io.cpp @@ -17,9 +17,11 @@ namespace case glm::highp: os << "uhi"; break; case glm::mediump: os << "umd"; break; case glm::lowp: os << "ulo"; break; - case glm::aligned_highp: os << "ahi"; break; - case glm::aligned_mediump: os << "amd"; break; - case glm::aligned_lowp: os << "alo"; break; +# if GLM_HAS_ALIGNED_TYPE + case glm::aligned_highp: os << "ahi"; break; + case glm::aligned_mediump: os << "amd"; break; + case glm::aligned_lowp: os << "alo"; break; +# endif } } From 6fa619ee13c11c06f59eeeec32587fbedfc9a2b2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 03:46:50 +0200 Subject: [PATCH 06/11] Fixed disabled long long warning on GCC --- glm/detail/type_int.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/detail/type_int.hpp b/glm/detail/type_int.hpp index 56939255..764a32cf 100644 --- a/glm/detail/type_int.hpp +++ b/glm/detail/type_int.hpp @@ -35,7 +35,7 @@ namespace detail typedef unsigned __int64 uint64; # elif GLM_COMPILER & GLM_COMPILER_GCC -# pragma GCC diagnostic ignored "-Wno-long-long" +# pragma GCC diagnostic ignored "-Wlong-long" __extension__ typedef signed long long sint64; __extension__ typedef unsigned long long uint64; From aa7951aaa4374d7be1e4a273e14c9a34200930c3 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 10:54:53 +0200 Subject: [PATCH 07/11] Fixed long long warnings --- glm/detail/func_integer.inl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 0891eb01..7d89bfe2 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -12,6 +12,13 @@ #endif//(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC) #include +#if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic ignored "-Wlong-long" +#endif +#if (GLM_COMPILER & GLM_COMPILER_CLANG) +# pragma clang diagnostic ignored "-Wc++11-long-long" +#endif + namespace glm{ namespace detail { From de77fadde280ef9db252e93eb67bcf99b0d27133 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 10:56:27 +0200 Subject: [PATCH 08/11] Fixed long long warnings --- glm/detail/func_integer.inl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 7d89bfe2..25910eb0 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -12,11 +12,13 @@ #endif//(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC) #include -#if GLM_COMPILER & GLM_COMPILER_GCC -# pragma GCC diagnostic ignored "-Wlong-long" -#endif -#if (GLM_COMPILER & GLM_COMPILER_CLANG) -# pragma clang diagnostic ignored "-Wc++11-long-long" +#if !GLM_HAS_EXTENDED_INTEGER_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +# if (GLM_COMPILER & GLM_COMPILER_CLANG) +# pragma clang diagnostic ignored "-Wc++11-long-long" +# endif #endif namespace glm{ From 60026b20664681c1665baa2cb6afd13e72fa1521 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 11:07:46 +0200 Subject: [PATCH 09/11] Fixed build and clean up --- glm/detail/precision.hpp | 4 +++- glm/detail/type_vec1.hpp | 2 +- glm/detail/type_vec3.hpp | 2 +- glm/detail/type_vec4.hpp | 1 - glm/detail/type_vec4_simd.inl | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/glm/detail/precision.hpp b/glm/detail/precision.hpp index 7980dbdc..7c54437c 100644 --- a/glm/detail/precision.hpp +++ b/glm/detail/precision.hpp @@ -3,6 +3,8 @@ #pragma once +#include "setup.hpp" + namespace glm { enum precision @@ -29,7 +31,7 @@ namespace glm defaultp = highp # endif }; - + namespace detail { template diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index ea25ba44..fe55cd22 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -21,9 +21,9 @@ namespace glm { // -- Implementation detail -- + typedef T value_type; typedef tvec1 type; typedef tvec1 bool_type; - typedef T value_type; // -- Data -- diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 64e159d8..f90ad3c6 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -20,9 +20,9 @@ namespace glm { // -- Implementation detail -- + typedef T value_type; typedef tvec3 type; typedef tvec3 bool_type; - typedef T value_type; // -- Data -- diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index dcd59dd5..b08bd105 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -3,7 +3,6 @@ #pragma once -#include "setup.hpp" #include "type_vec.hpp" #ifdef GLM_SWIZZLE # if GLM_HAS_ANONYMOUS_UNION diff --git a/glm/detail/type_vec4_simd.inl b/glm/detail/type_vec4_simd.inl index 21504f03..97b65f44 100644 --- a/glm/detail/type_vec4_simd.inl +++ b/glm/detail/type_vec4_simd.inl @@ -49,7 +49,7 @@ namespace detail return Result; } }; -# endif +# endif//GLM_SWIZZLE template struct compute_vec4_add From 1d8dadcd15d241e8e079051c17f9a2339dee23a2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 11:15:53 +0200 Subject: [PATCH 10/11] Fixed disable pedentic warning for anoynymous struct in GLM --- glm/detail/type_vec4.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index b08bd105..027136e0 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -29,7 +29,7 @@ namespace glm # if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +# pragma GCC diagnostic ignored "-pedantic" # endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic push From 867f03c5f222228732cc7a24133535275ec6c616 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 17 Jul 2016 11:30:12 +0200 Subject: [PATCH 11/11] Fixed disable pedentic warning for anoynymous struct in GLM --- CMakeLists.txt | 1 + glm/detail/type_vec1.hpp | 2 +- glm/detail/type_vec2.hpp | 2 +- glm/detail/type_vec3.hpp | 2 +- glm/gtc/quaternion.hpp | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49f85002..d1041c95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ else() add_definitions(/Za) elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")) add_definitions(-pedantic) + add_definitions(-pedantic) endif() endif() diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index fe55cd22..dff3140d 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -30,7 +30,7 @@ namespace glm # if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +# pragma GCC diagnostic ignored "-pedantic" # endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic push diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 331782dd..718919e4 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -29,7 +29,7 @@ namespace glm # if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +# pragma GCC diagnostic ignored "-pedantic" # endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic push diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index f90ad3c6..79d9ee32 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -29,7 +29,7 @@ namespace glm # if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +# pragma GCC diagnostic ignored "-pedantic" # endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic push diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 6a42bdf3..fee13db7 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -43,7 +43,7 @@ namespace glm # if GLM_HAS_ALIGNED_TYPE # if GLM_COMPILER & GLM_COMPILER_GCC # pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +# pragma GCC diagnostic ignored "-pedantic" # endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic push