Skip to content

Commit

Permalink
Disable warnings by default
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Jan 11, 2024
1 parent ec79055 commit 6397e35
Show file tree
Hide file tree
Showing 92 changed files with 1,012 additions and 603 deletions.
11 changes: 11 additions & 0 deletions glm/detail/func_integer.inl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@

#if !GLM_HAS_EXTENDED_INTEGER_TYPE
# if GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wlong-long"
# endif
# if (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wc++11-long-long"
# endif
#endif
Expand Down Expand Up @@ -375,6 +377,15 @@ namespace detail
}
}//namespace glm

#if !GLM_HAS_EXTENDED_INTEGER_TYPE
# if GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic pop
# endif
# if (GLM_COMPILER & GLM_COMPILER_CLANG)
# pragma clang diagnostic pop
# endif
#endif

#if GLM_CONFIG_SIMD == GLM_ENABLE
# include "func_integer_simd.inl"
#endif
Expand Down
6 changes: 3 additions & 3 deletions glm/detail/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,10 +877,10 @@ namespace detail
///////////////////////////////////////////////////////////////////////////////////
// Silent warnings

#ifdef GLM_FORCE_SILENT_WARNINGS
# define GLM_SILENT_WARNINGS GLM_ENABLE
#else
#ifdef GLM_FORCE_WARNINGS
# define GLM_SILENT_WARNINGS GLM_DISABLE
#else
# define GLM_SILENT_WARNINGS GLM_ENABLE
#endif

///////////////////////////////////////////////////////////////////////////////////
Expand Down
40 changes: 20 additions & 20 deletions glm/detail/type_quat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@

namespace glm
{
template<typename T, qualifier Q>
struct qua
{
// -- Implementation detail --

typedef qua<T, Q> type;
typedef T value_type;

// -- Data --

# if GLM_SILENT_WARNINGS == GLM_ENABLE
# if GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic push
Expand All @@ -39,6 +29,16 @@ namespace glm
# endif
# endif

template<typename T, qualifier Q>
struct qua
{
// -- Implementation detail --

typedef qua<T, Q> type;
typedef T value_type;

// -- Data --

# if GLM_LANG & GLM_LANG_CXXMS_FLAG
union
{
Expand All @@ -56,16 +56,6 @@ namespace glm
# else
T x, y, z, w;
# endif
# endif

# if GLM_SILENT_WARNINGS == GLM_ENABLE
# if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
# elif GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic pop
# elif GLM_COMPILER & GLM_COMPILER_VC
# pragma warning(pop)
# endif
# endif

// -- Component accesses --
Expand Down Expand Up @@ -139,6 +129,16 @@ namespace glm
GLM_FUNC_DECL GLM_CONSTEXPR qua<T, Q>& operator/=(U s);
};

# if GLM_SILENT_WARNINGS == GLM_ENABLE
# if GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
# elif GLM_COMPILER & GLM_COMPILER_GCC
# pragma GCC diagnostic pop
# elif GLM_COMPILER & GLM_COMPILER_VC
# pragma warning(pop)
# endif
# endif

// -- Unary bit operators --

template<typename T, qualifier Q>
Expand Down
10 changes: 8 additions & 2 deletions glm/ext/scalar_ulp.inl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
#include <cmath>
#include <cfloat>

#if(GLM_COMPILER & GLM_COMPILER_VC)
#if GLM_COMPILER & GLM_COMPILER_VC
# pragma warning(push)
# pragma warning(disable : 4127)
#elif GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wsign-conversion"
# pragma clang diagnostic ignored "-Wpadded"
#endif

typedef union
Expand Down Expand Up @@ -182,8 +186,10 @@ namespace detail
}//namespace detail
}//namespace glm

#if(GLM_COMPILER & GLM_COMPILER_VC)
#if GLM_COMPILER & GLM_COMPILER_VC
# pragma warning(pop)
#elif GLM_COMPILER & GLM_COMPILER_CLANG
# pragma clang diagnostic pop
#endif

namespace glm
Expand Down
13 changes: 13 additions & 0 deletions glm/gtc/packing.inl
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,13 @@ namespace detail
// return ((floatTo11bit(x) & ((1 << 11) - 1)) << 0) | ((floatTo11bit(y) & ((1 << 11) - 1)) << 11) | ((floatTo10bit(z) & ((1 << 10) - 1)) << 22);
// }

#if GLM_SILENT_WARNINGS == GLM_ENABLE
# if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
# endif
#endif

union u3u3u2
{
struct Data
Expand Down Expand Up @@ -235,6 +242,12 @@ namespace detail
uint16 pack;
};

#if GLM_SILENT_WARNINGS == GLM_ENABLE
# if defined(__clang__)
# pragma clang diagnostic pop
# endif
#endif

union u10u10u10u2
{
struct Data
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/associated_min_max.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_associated_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_associated_min_max is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/bit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
// Dependencies
#include "../gtc/bitfield.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_bit is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_bit extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_bit is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_bit extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/closest_point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_closest_point extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_closest_point extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/color_encoding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
#include "../vec3.hpp"
#include <limits>

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTC_color_encoding is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTC_color_encoding extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTC_color_encoding is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTC_color_encoding extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/color_space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_color_space extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_color_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_color_space extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/color_space_YCoCg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_color_space_YCoCg is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_color_space_YCoCg is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
#include "../vec4.hpp"
#include "../gtc/vec1.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_common extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_common is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_common extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/compatibility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
#include "../glm.hpp"
#include "../gtc/quaternion.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_compatibility is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_compatibility extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_compatibility is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_compatibility extension included")
#endif

#if GLM_COMPILER & GLM_COMPILER_VC
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/component_wise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
#include "../detail/setup.hpp"
#include "../detail/qualifier.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_component_wise extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_component_wise is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_component_wise extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/dual_quaternion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
#include "../gtc/constants.hpp"
#include "../gtc/quaternion.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_dual_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_dual_quaternion extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_dual_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_dual_quaternion extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/easing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
#include "../gtc/constants.hpp"
#include "../detail/qualifier.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_easing is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_easing extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_easing is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_easing extension included")
#endif

namespace glm{
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/euler_angles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_euler_angles is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_euler_angles extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_euler_angles is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_euler_angles extension included")
#endif

namespace glm
Expand Down
10 changes: 4 additions & 6 deletions glm/gtx/extend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
// Dependency:
#include "../glm.hpp"

#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_extend extension included")
# endif
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_extend extension included")
#endif

namespace glm
Expand Down
Loading

0 comments on commit 6397e35

Please sign in to comment.