Skip to content

Commit 0d7947b

Browse files
committed
[libc++] Implement P2614R2 (Deprecate numeric_limits::has_denorm)
Reviewed By: #libc, ldionne Spies: ldionne, Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D155411
1 parent 5d8fb47 commit 0d7947b

File tree

9 files changed

+145
-25
lines changed

9 files changed

+145
-25
lines changed

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Implemented Papers
5252
- P2697R1 - Interfacing ``bitset`` with ``string_view``
5353
- P2443R1 - ``views::chunk_by``
5454
- P2538R1 - ADL-proof ``std::projected``
55+
- P2614R2 - Deprecate ``numeric_limits::has_denorm``
5556

5657

5758
Improvements and New Features

libcxx/docs/Status/Cxx23Papers.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"`P2655R3 <https://wg21.link/P2655R3>`__","LWG", "``common_reference_t`` of ``reference_wrapper`` Should Be a Reference Type","February 2023","","",""
118118
"`P2652R2 <https://wg21.link/P2652R2>`__","LWG", "Disallow User Specialization of ``allocator_traits``","February 2023","","",""
119119
"`P2787R1 <https://wg21.link/P2787R1>`__","LWG", "``pmr::generator`` - Promise Types are not Values","February 2023","","",""
120-
"`P2614R2 <https://wg21.link/P2614R2>`__","LWG", "Deprecate ``numeric_limits::has_denorm``","February 2023","","",""
120+
"`P2614R2 <https://wg21.link/P2614R2>`__","LWG", "Deprecate ``numeric_limits::has_denorm``","February 2023","|Complete|","18.0",""
121121
"`P2588R3 <https://wg21.link/P2588R3>`__","LWG", "``barrier``’s phase completion guarantees","February 2023","","",""
122122
"`P2763R1 <https://wg21.link/P2763R1>`__","LWG", "``layout_stride`` static extents default constructor fix","February 2023","","",""
123123
"`P2736R2 <https://wg21.link/P2736R2>`__","CWG","Referencing The Unicode Standard","February 2023","","","|format|"

libcxx/include/limits

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public:
4343
static constexpr bool has_infinity = false;
4444
static constexpr bool has_quiet_NaN = false;
4545
static constexpr bool has_signaling_NaN = false;
46-
static constexpr float_denorm_style has_denorm = denorm_absent;
47-
static constexpr bool has_denorm_loss = false;
46+
static constexpr float_denorm_style has_denorm = denorm_absent; // deprecated in C++23
47+
static constexpr bool has_denorm_loss = false; // deprecated in C++23
4848
static constexpr T infinity() noexcept;
4949
static constexpr T quiet_NaN() noexcept;
5050
static constexpr T signaling_NaN() noexcept;
@@ -68,7 +68,7 @@ enum float_round_style
6868
round_toward_neg_infinity = 3
6969
};
7070
71-
enum float_denorm_style
71+
enum float_denorm_style // deprecated in C++23
7272
{
7373
denorm_indeterminate = -1,
7474
denorm_absent = 0,
@@ -128,7 +128,7 @@ enum float_round_style
128128
round_toward_neg_infinity = 3
129129
};
130130

131-
enum float_denorm_style
131+
enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style
132132
{
133133
denorm_indeterminate = -1,
134134
denorm_absent = 0,
@@ -164,8 +164,8 @@ protected:
164164
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
165165
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
166166
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
167-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
168-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
167+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
168+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
169169
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
170170
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
171171
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
@@ -224,8 +224,8 @@ protected:
224224
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
225225
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
226226
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
227-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
228-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
227+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
228+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
229229
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
230230
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
231231
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
@@ -277,8 +277,8 @@ protected:
277277
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
278278
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
279279
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
280-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
281-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
280+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
281+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
282282
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
283283
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
284284
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
@@ -323,8 +323,8 @@ protected:
323323
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
324324
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
325325
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
326-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
327-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
326+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
327+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
328328
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
329329
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
330330
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
@@ -373,8 +373,8 @@ protected:
373373
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
374374
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
375375
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
376-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
377-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
376+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
377+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
378378
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
379379
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
380380
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
@@ -423,8 +423,8 @@ protected:
423423
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
424424
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
425425
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
426-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
427-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
426+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
427+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
428428
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
429429
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
430430
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
@@ -477,8 +477,10 @@ public:
477477
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
478478
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
479479
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
480-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
481-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
480+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
481+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
482+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
483+
_LIBCPP_SUPPRESS_DEPRECATED_POP
482484
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
483485
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
484486
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -570,8 +572,10 @@ public:
570572
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
571573
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
572574
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
573-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
574-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
575+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
576+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
577+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
578+
_LIBCPP_SUPPRESS_DEPRECATED_POP
575579
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
576580
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
577581
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -663,8 +667,10 @@ public:
663667
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
664668
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
665669
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
666-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
667-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
670+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
671+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
672+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
673+
_LIBCPP_SUPPRESS_DEPRECATED_POP
668674
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
669675
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
670676
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
@@ -756,8 +762,10 @@ public:
756762
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
757763
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
758764
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
759-
static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
760-
static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
765+
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
766+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
767+
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
768+
_LIBCPP_SUPPRESS_DEPRECATED_POP
761769
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
762770
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
763771
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
10+
11+
// ADDITIONAL_COMPILE_FLAGS: -Wno-unused-value
12+
13+
#include <limits>
14+
15+
#include "type_algorithms.h"
16+
17+
void func() {
18+
std::numeric_limits<bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
19+
std::numeric_limits<bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
20+
std::numeric_limits<bool>::denorm_min();
21+
22+
std::numeric_limits<int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
23+
std::numeric_limits<int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
24+
std::numeric_limits<int>::denorm_min();
25+
26+
std::numeric_limits<float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
27+
std::numeric_limits<float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
28+
std::numeric_limits<float>::denorm_min();
29+
30+
std::numeric_limits<double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
31+
std::numeric_limits<double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
32+
std::numeric_limits<double>::denorm_min();
33+
34+
std::numeric_limits<long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
35+
std::numeric_limits<long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
36+
std::numeric_limits<long double>::denorm_min();
37+
38+
std::numeric_limits<const bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
39+
std::numeric_limits<const bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
40+
std::numeric_limits<const bool>::denorm_min();
41+
42+
std::numeric_limits<const int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
43+
std::numeric_limits<const int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
44+
std::numeric_limits<const int>::denorm_min();
45+
46+
std::numeric_limits<const float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
47+
std::numeric_limits<const float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
48+
std::numeric_limits<const float>::denorm_min();
49+
50+
std::numeric_limits<const double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
51+
std::numeric_limits<const double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
52+
std::numeric_limits<const double>::denorm_min();
53+
54+
std::numeric_limits<const long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
55+
std::numeric_limits<const long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
56+
std::numeric_limits<const long double>::denorm_min();
57+
58+
std::numeric_limits<volatile bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
59+
std::numeric_limits<volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
60+
std::numeric_limits<volatile bool>::denorm_min();
61+
62+
std::numeric_limits<volatile int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
63+
std::numeric_limits<volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
64+
std::numeric_limits<volatile int>::denorm_min();
65+
66+
std::numeric_limits<volatile float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
67+
std::numeric_limits<volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
68+
std::numeric_limits<volatile float>::denorm_min();
69+
70+
std::numeric_limits<volatile double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
71+
std::numeric_limits<volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
72+
std::numeric_limits<volatile double>::denorm_min();
73+
74+
std::numeric_limits<volatile long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
75+
std::numeric_limits<volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
76+
std::numeric_limits<volatile long double>::denorm_min();
77+
78+
std::numeric_limits<const volatile bool>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
79+
std::numeric_limits<const volatile bool>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
80+
std::numeric_limits<const volatile bool>::denorm_min();
81+
82+
std::numeric_limits<const volatile int>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
83+
std::numeric_limits<const volatile int>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
84+
std::numeric_limits<const volatile int>::denorm_min();
85+
86+
std::numeric_limits<const volatile float>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
87+
std::numeric_limits<const volatile float>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
88+
std::numeric_limits<const volatile float>::denorm_min();
89+
90+
std::numeric_limits<const volatile double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
91+
std::numeric_limits<const volatile double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
92+
std::numeric_limits<const volatile double>::denorm_min();
93+
94+
std::numeric_limits<const volatile long double>::has_denorm; // expected-warning {{'has_denorm' is deprecated}}
95+
std::numeric_limits<const volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}}
96+
std::numeric_limits<const volatile long double>::denorm_min();
97+
98+
std::denorm_indeterminate; // expected-warning {{'denorm_indeterminate' is deprecated}}
99+
std::denorm_absent; // expected-warning {{'denorm_absent' is deprecated}}
100+
std::denorm_present; // expected-warning {{'denorm_present' is deprecated}}
101+
}

libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
10+
911
#include <limits>
1012

1113
#include "test_macros.h"

libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
10+
911
// test numeric_limits
1012

1113
// has_denorm

libcxx/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
10+
911
// test numeric_limits
1012

1113
// has_denorm_loss

libcxx/test/std/language.support/support.limits/limits/numeric.limits/default.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
10+
911
// test numeric_limits
1012

1113
// The default numeric_limits<T> template shall have all members, but with

libcxx/test/std/language.support/support.limits/limits/round.style/check_values.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
10+
911
// test numeric_limits
1012

1113
// float_denorm_style

0 commit comments

Comments
 (0)