mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
adding clang/gcc suppression of the deprecation warnings.
This commit is contained in:
parent
7adf7eb6fe
commit
2b8f7aea32
@ -57,6 +57,11 @@
|
|||||||
#endif // _MSC_VER < 1910
|
#endif // _MSC_VER < 1910
|
||||||
#endif // _MSC_VER
|
#endif // _MSC_VER
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
// GCC 7 does not like the signed unsigned missmatch (size_t ptrdiff_t)
|
// GCC 7 does not like the signed unsigned missmatch (size_t ptrdiff_t)
|
||||||
// While there is a conversion from signed to unsigned, it happens at
|
// While there is a conversion from signed to unsigned, it happens at
|
||||||
// compiletime, so the compiler wouldn't have to warn indiscriminently, but
|
// compiletime, so the compiler wouldn't have to warn indiscriminently, but
|
||||||
@ -2261,4 +2266,8 @@ general_span_iterator<Span> operator+(typename general_span_iterator<Span>::diff
|
|||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // __GNUC__ > 6
|
#endif // __GNUC__ > 6
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // GSL_MULTI_SPAN_H
|
#endif // GSL_MULTI_SPAN_H
|
||||||
|
@ -19,7 +19,11 @@
|
|||||||
// so people aren't annoyed by them when running the tool.
|
// so people aren't annoyed by them when running the tool.
|
||||||
#pragma warning(disable : 26440 26426) // from catch
|
#pragma warning(disable : 26440 26426) // from catch
|
||||||
#pragma warning(disable : 4996) // use of function or classes marked [[deprecated]]
|
#pragma warning(disable : 4996) // use of function or classes marked [[deprecated]]
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <catch/catch.hpp> // for AssertionHandler, StringRef, TEST_CASE
|
#include <catch/catch.hpp> // for AssertionHandler, StringRef, TEST_CASE
|
||||||
@ -115,3 +119,7 @@ TEST_CASE("bounds_convertible")
|
|||||||
#ifdef CONFIRM_COMPILATION_ERRORS
|
#ifdef CONFIRM_COMPILATION_ERRORS
|
||||||
copy(src_span_static, dst_span_static);
|
copy(src_span_static, dst_span_static);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
@ -18,9 +18,13 @@
|
|||||||
// blanket turn off warnings from CppCoreCheck from catch
|
// blanket turn off warnings from CppCoreCheck from catch
|
||||||
// so people aren't annoyed by them when running the tool.
|
// so people aren't annoyed by them when running the tool.
|
||||||
#pragma warning(disable : 26440 26426) // from catch
|
#pragma warning(disable : 26440 26426) // from catch
|
||||||
#pragma warning(disable : 4996) // multi_span is in the process of being deprecated.
|
//#pragma warning(disable : 4996) // multi_span is in the process of being deprecated.
|
||||||
// Suppressing warnings until it is completely removed
|
// Suppressing warnings until it is completely removed
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
|
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
|
||||||
@ -1785,3 +1789,7 @@ TEST_CASE("iterator")
|
|||||||
#ifdef CONFIRM_COMPILATION_ERRORS
|
#ifdef CONFIRM_COMPILATION_ERRORS
|
||||||
copy(src_span_static, dst_span_static);
|
copy(src_span_static, dst_span_static);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
@ -20,7 +20,11 @@
|
|||||||
#pragma warning(disable : 26440 26426) // from catch deprecated
|
#pragma warning(disable : 26440 26426) // from catch deprecated
|
||||||
#pragma warning(disable : 4996) // strided_span is in the process of being deprecated.
|
#pragma warning(disable : 4996) // strided_span is in the process of being deprecated.
|
||||||
// Suppressing warnings until it is completely removed
|
// Suppressing warnings until it is completely removed
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
|
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
|
||||||
@ -796,3 +800,7 @@ TEST_CASE("strided_span_conversion")
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __clang__ || __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user