1 /* Test for <float.h> C99 macros. */ 2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */ 3 /* { dg-do preprocess } */ 4 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ 5 6 /* This test checks that the C99 macros (but not the C11 ones) are defined; 7 it does not check the correctness of their values. */ 8 9 #include <float.h> 10 11 #ifndef FLT_ROUNDS 12 #error "FLT_ROUNDS undefined" 13 #endif 14 15 #ifndef FLT_RADIX 16 #error "FLT_RADIX undefined" 17 #endif 18 19 #ifndef FLT_MANT_DIG 20 #error "FLT_MANT_DIG undefined" 21 #endif 22 23 #ifndef FLT_DIG 24 #error "FLT_DIG undefined" 25 #endif 26 27 #ifndef FLT_MIN_EXP 28 #error "FLT_MIN_EXP undefined" 29 #endif 30 31 #ifndef FLT_MIN_10_EXP 32 #error "FLT_MIN_10_EXP undefined" 33 #endif 34 35 #ifndef FLT_MAX_EXP 36 #error "FLT_MAX_EXP undefined" 37 #endif 38 39 #ifndef FLT_MAX_10_EXP 40 #error "FLT_MAX_10_EXP undefined" 41 #endif 42 43 #ifndef FLT_MAX 44 #error "FLT_MAX undefined" 45 #endif 46 47 #ifndef FLT_EPSILON 48 #error "FLT_EPSILON undefined" 49 #endif 50 51 #ifndef FLT_MIN 52 #error "FLT_MIN undefined" 53 #endif 54 55 #ifndef DBL_MANT_DIG 56 #error "DBL_MANT_DIG undefined" 57 #endif 58 59 #ifndef DBL_DIG 60 #error "DBL_DIG undefined" 61 #endif 62 63 #ifndef DBL_MIN_EXP 64 #error "DBL_MIN_EXP undefined" 65 #endif 66 67 #ifndef DBL_MIN_10_EXP 68 #error "DBL_MIN_10_EXP undefined" 69 #endif 70 71 #ifndef DBL_MAX_EXP 72 #error "DBL_MAX_EXP undefined" 73 #endif 74 75 #ifndef DBL_MAX_10_EXP 76 #error "DBL_MAX_10_EXP undefined" 77 #endif 78 79 #ifndef DBL_MAX 80 #error "DBL_MAX undefined" 81 #endif 82 83 #ifndef DBL_EPSILON 84 #error "DBL_EPSILON undefined" 85 #endif 86 87 #ifndef DBL_MIN 88 #error "DBL_MIN undefined" 89 #endif 90 91 #ifndef LDBL_MANT_DIG 92 #error "LDBL_MANT_DIG undefined" 93 #endif 94 95 #ifndef LDBL_DIG 96 #error "LDBL_DIG undefined" 97 #endif 98 99 #ifndef LDBL_MIN_EXP 100 #error "LDBL_MIN_EXP undefined" 101 #endif 102 103 #ifndef LDBL_MIN_10_EXP 104 #error "LDBL_MIN_10_EXP undefined" 105 #endif 106 107 #ifndef LDBL_MAX_EXP 108 #error "LDBL_MAX_EXP undefined" 109 #endif 110 111 #ifndef LDBL_MAX_10_EXP 112 #error "LDBL_MAX_10_EXP undefined" 113 #endif 114 115 #ifndef LDBL_MAX 116 #error "LDBL_MAX undefined" 117 #endif 118 119 #ifndef LDBL_EPSILON 120 #error "LDBL_EPSILON undefined" 121 #endif 122 123 #ifndef LDBL_MIN 124 #error "LDBL_MIN undefined" 125 #endif 126 127 #ifndef FLT_EVAL_METHOD 128 #error "FLT_EVAL_METHOD undefined" 129 #endif 130 131 #ifndef DECIMAL_DIG 132 #error "DECIMAL_DIG undefined" 133 #endif 134 135 #ifdef FLT_DECIMAL_DIG 136 #error "FLT_DECIMAL_DIG defined" 137 #endif 138 139 #ifdef DBL_DECIMAL_DIG 140 #error "DBL_DECIMAL_DIG defined" 141 #endif 142 143 #ifdef LDBL_DECIMAL_DIG 144 #error "LDBL_DECIMAL_DIG defined" 145 #endif 146 147 #ifdef FLT_HAS_SUBNORM 148 #error "FLT_HAS_SUBNORM defined" 149 #endif 150 151 #ifdef DBL_HAS_SUBNORM 152 #error "DBL_HAS_SUBNORM defined" 153 #endif 154 155 #ifdef LDBL_HAS_SUBNORM 156 #error "LDBL_HAS_SUBNORM defined" 157 #endif 158 159 #ifdef FLT_TRUE_MIN 160 #error "FLT_TRUE_MIN defined" 161 #endif 162 163 #ifdef DBL_TRUE_MIN 164 #error "DBL_TRUE_MIN defined" 165 #endif 166 167 #ifdef LDBL_TRUE_MIN 168 #error "LDBL_TRUE_MIN defined" 169 #endif 170