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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [pragma-float-const-decimal64-6.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-std=c99 -pedantic-errors" } */
3
 
4
/* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
5
   C99 6.4.4.2a (New).
6
 
7
   Check that there is a pedantic error for the use of pragma
8
   STD FLOAT_CONST_DECIMAL64.  */
9
 
10
double a;
11
 
12
void f1 (void)
13
{
14
#pragma STDC FLOAT_CONST_DECIMAL64 ON           /* { dg-error "ISO C" } */
15
  a = 1.0;
16
}
17
 
18
void f2 (void)
19
{
20
#pragma STDC FLOAT_CONST_DECIMAL64 OFF          /* { dg-error "ISO C" } */
21
  a = 2.0;
22
}
23
 
24
void f3 (void)
25
{
26
#pragma STDC FLOAT_CONST_DECIMAL64 DEFAULT      /* { dg-error "ISO C" } */
27
  a = 3.0;
28
}
29
 
30
void f4 (void)
31
{
32
  _Pragma ("STDC FLOAT_CONST_DECIMAL64 ON")     /* { dg-error "ISO C" } */
33
  a = 1.0;
34
}
35
 
36
void f5 (void)
37
{
38
  _Pragma ("STDC FLOAT_CONST_DECIMAL64 OFF")    /* { dg-error "ISO C" } */
39
  a = 2.0;
40
}
41
 
42
void f6 (void)
43
{
44
  _Pragma ("STDC FLOAT_CONST_DECIMAL64 DEFAULT") /* { dg-error "ISO C" } */
45
  a = 3.0;
46
}

powered by: WebSVN 2.1.0

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