PR middle-end/27945
[official-gcc.git] / gcc / testsuite / gcc.dg / c90-float-1.c
blob39a585bcd09bc4c6bc36c3c56136552ef075fbaa
1 /* Test for <float.h> C90 macros. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do preprocess } */
4 /* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
6 /* This test checks that the C90 macros (but not the C99 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 #ifdef FLT_EVAL_METHOD
128 #error "FLT_EVAL_METHOD defined"
129 #endif
131 #ifdef DECIMAL_DIG
132 #error "DECIMAL_DIG defined"
133 #endif