From c80e142816d05b7a5feb28b1d338f993ac5451d3 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 16 Jul 2016 22:25:09 +0200 Subject: [PATCH] No more warnings for use of long long --- glm/detail/type_int.hpp | 61 +++++++++++++++++++++++++++-------------- readme.md | 1 + 2 files changed, 41 insertions(+), 21 deletions(-) diff --git a/glm/detail/type_int.hpp b/glm/detail/type_int.hpp index 6148b1f9..b82cc8c3 100644 --- a/glm/detail/type_int.hpp +++ b/glm/detail/type_int.hpp @@ -43,9 +43,9 @@ namespace detail # pragma GCC diagnostic pop -# elif GLM_COMPILER & GLM_COMPILER_CLANG +# elif (GLM_COMPILER & GLM_COMPILER_CLANG) # pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wno-c++11-long-long" +# pragma clang diagnostic ignored "-Wc++11-long-long" typedef signed long long sint64; typedef unsigned long long uint64; @@ -108,13 +108,7 @@ namespace detail { typedef long type; }; - - template <> - struct make_signed - { - typedef long long type; - }; - + template <> struct make_signed { @@ -139,12 +133,6 @@ namespace detail typedef long type; }; - template <> - struct make_signed - { - typedef long long type; - }; - template struct make_unsigned {}; @@ -173,12 +161,6 @@ namespace detail typedef unsigned long type; }; - template <> - struct make_unsigned - { - typedef unsigned long long type; - }; - template <> struct make_unsigned { @@ -202,12 +184,49 @@ namespace detail { typedef unsigned long type; }; + +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wno-long-long" +# endif + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wc++11-long-long" +# endif + template <> + struct make_signed + { + typedef long long type; + }; + + template <> + struct make_signed + { + typedef long long type; + }; + + template <> + struct make_unsigned + { + typedef unsigned long long type; + }; + template <> struct make_unsigned { typedef unsigned long long type; }; + +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif + # endif//GLM_HAS_MAKE_SIGNED }//namespace detail diff --git a/readme.md b/readme.md index 401d53c0..5e313816 100644 --- a/readme.md +++ b/readme.md @@ -79,6 +79,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Added PowerPC CPUs detection - Use Cuda built-in function for abs function implementation with Cuda compiler - Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG +- No more warnings for use of long long ##### Fixes: - Fixed GTX_extended_min_max filename typo #386