| 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(gcc-style-warnings): -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< |
| 96 |
const volatile long double>::has_denorm_loss; // expected-warning {{'has_denorm_loss' is deprecated}} |
| 97 |
std::numeric_limits<const volatile long double>::denorm_min(); |
| 98 |
|
| 99 |
std::denorm_indeterminate; // expected-warning {{'denorm_indeterminate' is deprecated}} |
| 100 |
std::denorm_absent; // expected-warning {{'denorm_absent' is deprecated}} |
| 101 |
std::denorm_present; // expected-warning {{'denorm_present' is deprecated}} |
| 102 |
} |