OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [huge-val1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/23139: HUGE_VAL definition should be accepted with -pedantic.
2
// Origin: Joseph Myers 
3
// { dg-do link }
4
// { dg-options "-pedantic-errors" }
5
 
6
#include 
7
 
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
15
 
16
extern void link_failure ();
17
 
18
int
19
main ()
20
{
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
33
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.