2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-float-1.c
blob7ee87a564a46fe3129da10618630a4b23b5184c5
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" } */
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. */
9 #include <float.h>
11 #ifndef FLT_ROUNDS
12 #error "FLT_ROUNDS undefined"
13 #endif
15 #ifndef FLT_RADIX
16 #error "FLT_RADIX undefined"
17 #endif
19 #ifndef FLT_MANT_DIG
20 #error "FLT_MANT_DIG undefined"
21 #endif
23 #ifndef FLT_DIG
24 #error "FLT_DIG undefined"
25 #endif
27 #ifndef FLT_MIN_EXP
28 #error "FLT_MIN_EXP undefined"
29 #endif
31 #ifndef FLT_MIN_10_EXP
32 #error "FLT_MIN_10_EXP undefined"
33 #endif
35 #ifndef FLT_MAX_EXP
36 #error "FLT_MAX_EXP undefined"
37 #endif
39 #ifndef FLT_MAX_10_EXP
40 #error "FLT_MAX_10_EXP undefined"
41 #endif
43 #ifndef FLT_MAX
44 #error "FLT_MAX undefined"
45 #endif
47 #ifndef FLT_EPSILON
48 #error "FLT_EPSILON undefined"
49 #endif
51 #ifndef FLT_MIN
52 #error "FLT_MIN undefined"
53 #endif
55 #ifndef DBL_MANT_DIG
56 #error "DBL_MANT_DIG undefined"
57 #endif
59 #ifndef DBL_DIG
60 #error "DBL_DIG undefined"
61 #endif
63 #ifndef DBL_MIN_EXP
64 #error "DBL_MIN_EXP undefined"
65 #endif
67 #ifndef DBL_MIN_10_EXP
68 #error "DBL_MIN_10_EXP undefined"
69 #endif
71 #ifndef DBL_MAX_EXP
72 #error "DBL_MAX_EXP undefined"
73 #endif
75 #ifndef DBL_MAX_10_EXP
76 #error "DBL_MAX_10_EXP undefined"
77 #endif
79 #ifndef DBL_MAX
80 #error "DBL_MAX undefined"
81 #endif
83 #ifndef DBL_EPSILON
84 #error "DBL_EPSILON undefined"
85 #endif
87 #ifndef DBL_MIN
88 #error "DBL_MIN undefined"
89 #endif
91 #ifndef LDBL_MANT_DIG
92 #error "LDBL_MANT_DIG undefined"
93 #endif
95 #ifndef LDBL_DIG
96 #error "LDBL_DIG undefined"
97 #endif
99 #ifndef LDBL_MIN_EXP
100 #error "LDBL_MIN_EXP undefined"
101 #endif
103 #ifndef LDBL_MIN_10_EXP
104 #error "LDBL_MIN_10_EXP undefined"
105 #endif
107 #ifndef LDBL_MAX_EXP
108 #error "LDBL_MAX_EXP undefined"
109 #endif
111 #ifndef LDBL_MAX_10_EXP
112 #error "LDBL_MAX_10_EXP undefined"
113 #endif
115 #ifndef LDBL_MAX
116 #error "LDBL_MAX undefined"
117 #endif
119 #ifndef LDBL_EPSILON
120 #error "LDBL_EPSILON undefined"
121 #endif
123 #ifndef LDBL_MIN
124 #error "LDBL_MIN undefined"
125 #endif
127 #ifndef FLT_EVAL_METHOD
128 #error "FLT_EVAL_METHOD undefined"
129 #endif
131 #ifndef DECIMAL_DIG
132 #error "DECIMAL_DIG undefined"
133 #endif
135 #ifdef FLT_DECIMAL_DIG
136 #error "FLT_DECIMAL_DIG defined"
137 #endif
139 #ifdef DBL_DECIMAL_DIG
140 #error "DBL_DECIMAL_DIG defined"
141 #endif
143 #ifdef LDBL_DECIMAL_DIG
144 #error "LDBL_DECIMAL_DIG defined"
145 #endif
147 #ifdef FLT_HAS_SUBNORM
148 #error "FLT_HAS_SUBNORM defined"
149 #endif
151 #ifdef DBL_HAS_SUBNORM
152 #error "DBL_HAS_SUBNORM defined"
153 #endif
155 #ifdef LDBL_HAS_SUBNORM
156 #error "LDBL_HAS_SUBNORM defined"
157 #endif
159 #ifdef FLT_TRUE_MIN
160 #error "FLT_TRUE_MIN defined"
161 #endif
163 #ifdef DBL_TRUE_MIN
164 #error "DBL_TRUE_MIN defined"
165 #endif
167 #ifdef LDBL_TRUE_MIN
168 #error "LDBL_TRUE_MIN defined"
169 #endif