Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.dg / warn / huge-val1.C
blob2ddfae0c9c6836999d7a7378e11ac14e8a5dcd6a
1 // PR c++/23139: HUGE_VAL definition should be accepted with -pedantic.
2 // Origin: Joseph Myers <joseph@codesourcery.com>
3 // { dg-do link }
4 // { dg-options "-pedantic-errors" }
6 #include <math.h>
8 double d = HUGE_VAL;
9 #ifdef HUGE_VALF
10 float f = HUGE_VALF;
11 #endif
12 #ifdef HUGE_VALL
13 long double l = HUGE_VALL;
14 #endif
16 extern void link_failure ();
18 int
19 main ()
21 #ifdef __GLIBC__
22   if (HUGE_VAL != __builtin_huge_val ())
23     link_failure ();
24 #ifdef HUGE_VALF
25   if (HUGE_VALF != __builtin_huge_valf ())
26     link_failure ();
27 #endif
28 #ifdef HUGE_VALL
29   if (HUGE_VALL != __builtin_huge_vall ())
30     link_failure ();
31 #endif
32 #endif