[libcxx-commits] [libcxx] 0d7947b - [libc++] Implement P2614R2 (Deprecate numeric_limits::has_denorm)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 6 02:31:01 PDT 2023


Author: Nikolas Klauser
Date: 2023-10-06T11:30:55+02:00
New Revision: 0d7947b08c00a41e0d6398b8b3cba33d9dbf3df1

URL: https://github.com/llvm/llvm-project/commit/0d7947b08c00a41e0d6398b8b3cba33d9dbf3df1
DIFF: https://github.com/llvm/llvm-project/commit/0d7947b08c00a41e0d6398b8b3cba33d9dbf3df1.diff

LOG: [libc++] Implement P2614R2 (Deprecate numeric_limits::has_denorm)

Reviewed By: #libc, ldionne

Spies: ldionne, Mordante, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155411

Added: 
    libcxx/test/std/depr/depr.numeric.imits.has.denorm/deprecated.verify.cpp

Modified: 
    libcxx/docs/ReleaseNotes/18.rst
    libcxx/docs/Status/Cxx23Papers.csv
    libcxx/include/limits
    libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
    libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
    libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
    libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
    libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/ReleaseNotes/18.rst b/libcxx/docs/ReleaseNotes/18.rst
index 640e6ce0769582c..138305bb875aaa3 100644
--- a/libcxx/docs/ReleaseNotes/18.rst
+++ b/libcxx/docs/ReleaseNotes/18.rst
@@ -52,6 +52,7 @@ Implemented Papers
 - P2697R1 - Interfacing ``bitset`` with ``string_view``
 - P2443R1 - ``views::chunk_by``
 - P2538R1 - ADL-proof ``std::projected``
+- P2614R2 - Deprecate ``numeric_limits::has_denorm``
 
 
 Improvements and New Features

diff  --git a/libcxx/docs/Status/Cxx23Papers.csv b/libcxx/docs/Status/Cxx23Papers.csv
index 9cb49fd5176ea5f..35319fb7576d3c6 100644
--- a/libcxx/docs/Status/Cxx23Papers.csv
+++ b/libcxx/docs/Status/Cxx23Papers.csv
@@ -117,7 +117,7 @@
 "`P2655R3 <https://wg21.link/P2655R3>`__","LWG", "``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type","February 2023","","",""
 "`P2652R2 <https://wg21.link/P2652R2>`__","LWG", "Disallow User Specialization of ``allocator_traits``","February 2023","","",""
 "`P2787R1 <https://wg21.link/P2787R1>`__","LWG", "``pmr::generator`` - Promise Types are not Values","February 2023","","",""
-"`P2614R2 <https://wg21.link/P2614R2>`__","LWG", "Deprecate ``numeric_limits::has_denorm``","February 2023","","",""
+"`P2614R2 <https://wg21.link/P2614R2>`__","LWG", "Deprecate ``numeric_limits::has_denorm``","February 2023","|Complete|","18.0",""
 "`P2588R3 <https://wg21.link/P2588R3>`__","LWG", "``barrier``’s phase completion guarantees","February 2023","","",""
 "`P2763R1 <https://wg21.link/P2763R1>`__","LWG", "``layout_stride`` static extents default constructor fix","February 2023","","",""
 "`P2736R2 <https://wg21.link/P2736R2>`__","CWG","Referencing The Unicode Standard","February 2023","","","|format|"

diff  --git a/libcxx/include/limits b/libcxx/include/limits
index 9f5949e63cff01a..51daee6c4968cb7 100644
--- a/libcxx/include/limits
+++ b/libcxx/include/limits
@@ -43,8 +43,8 @@ public:
     static constexpr bool has_infinity = false;
     static constexpr bool has_quiet_NaN = false;
     static constexpr bool has_signaling_NaN = false;
-    static constexpr float_denorm_style has_denorm = denorm_absent;
-    static constexpr bool has_denorm_loss = false;
+    static constexpr float_denorm_style has_denorm = denorm_absent; // deprecated in C++23
+    static constexpr bool has_denorm_loss = false;                  // deprecated in C++23
     static constexpr T infinity() noexcept;
     static constexpr T quiet_NaN() noexcept;
     static constexpr T signaling_NaN() noexcept;
@@ -68,7 +68,7 @@ enum float_round_style
     round_toward_neg_infinity =  3
 };
 
-enum float_denorm_style
+enum float_denorm_style // deprecated in C++23
 {
     denorm_indeterminate = -1,
     denorm_absent = 0,
@@ -128,7 +128,7 @@ enum float_round_style
     round_toward_neg_infinity =  3
 };
 
-enum float_denorm_style
+enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style
 {
     denorm_indeterminate = -1,
     denorm_absent = 0,
@@ -164,8 +164,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = false;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
@@ -224,8 +224,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = false;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
@@ -277,8 +277,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = false;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
@@ -323,8 +323,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = true;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
@@ -373,8 +373,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = true;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
@@ -423,8 +423,8 @@ protected:
     static _LIBCPP_CONSTEXPR const bool has_infinity = true;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
@@ -477,8 +477,10 @@ public:
     static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_POP
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -570,8 +572,10 @@ public:
     static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_POP
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -663,8 +667,10 @@ public:
     static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_POP
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -756,8 +762,10 @@ public:
     static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
     static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
     static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+_LIBCPP_SUPPRESS_DEPRECATED_POP
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
     _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}

diff  --git a/libcxx/test/std/depr/depr.numeric.imits.has.denorm/deprecated.verify.cpp b/libcxx/test/std/depr/depr.numeric.imits.has.denorm/deprecated.verify.cpp
new file mode 100644
index 000000000000000..82f838c57f1e448
--- /dev/null
+++ b/libcxx/test/std/depr/depr.numeric.imits.has.denorm/deprecated.verify.cpp
@@ -0,0 +1,101 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+// ADDITIONAL_COMPILE_FLAGS: -Wno-unused-value
+
+#include <limits>
+
+#include "type_algorithms.h"
+
+void func() {
+  std::numeric_limits<bool>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<bool>::denorm_min();
+
+  std::numeric_limits<int>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<int>::denorm_min();
+
+  std::numeric_limits<float>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<float>::denorm_min();
+
+  std::numeric_limits<double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<double>::denorm_min();
+
+  std::numeric_limits<long double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<long double>::denorm_min();
+
+  std::numeric_limits<const bool>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const bool>::denorm_min();
+
+  std::numeric_limits<const int>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const int>::denorm_min();
+
+  std::numeric_limits<const float>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const float>::denorm_min();
+
+  std::numeric_limits<const double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const double>::denorm_min();
+
+  std::numeric_limits<const long double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const long double>::denorm_min();
+
+  std::numeric_limits<volatile bool>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<volatile bool>::denorm_min();
+
+  std::numeric_limits<volatile int>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<volatile int>::denorm_min();
+
+  std::numeric_limits<volatile float>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<volatile float>::denorm_min();
+
+  std::numeric_limits<volatile double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<volatile double>::denorm_min();
+
+  std::numeric_limits<volatile long double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<volatile long double>::denorm_min();
+
+  std::numeric_limits<const volatile bool>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const volatile bool>::denorm_min();
+
+  std::numeric_limits<const volatile int>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const volatile int>::denorm_min();
+
+  std::numeric_limits<const volatile float>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const volatile float>::denorm_min();
+
+  std::numeric_limits<const volatile double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const volatile double>::denorm_min();
+
+  std::numeric_limits<const volatile long double>::has_denorm;      // expected-warning {{'has_denorm' is deprecated}}
+  std::numeric_limits<const volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
+  std::numeric_limits<const volatile long double>::denorm_min();
+
+  std::denorm_indeterminate; // expected-warning {{'denorm_indeterminate' is deprecated}}
+  std::denorm_absent;        // expected-warning {{'denorm_absent' is deprecated}}
+  std::denorm_present;       // expected-warning {{'denorm_present' is deprecated}}
+}

diff  --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
index 1d4c2686c7bb1cc..9d0b27c24eb891f 100644
--- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
 #include <limits>
 
 #include "test_macros.h"

diff  --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
index 7ca5a3defa8c0cd..ae9f3d733ea6ec6 100644
--- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
 // test numeric_limits
 
 // has_denorm

diff  --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
index 7b88f3c2b292d8b..e5eac655c18f17c 100644
--- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
 // test numeric_limits
 
 // has_denorm_loss

diff  --git a/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
index 88ca21fbba481de..ab96903c24f03aa 100644
--- a/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
 // test numeric_limits
 
 // The default numeric_limits<T> template shall have all members, but with

diff  --git a/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp b/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
index bb47763f376c814..e40526c7d022484 100644
--- a/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+
 // test numeric_limits
 
 // float_denorm_style


        


More information about the libcxx-commits mailing list