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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [pragma-float-const-decimal64-4.c] - Blame information for rev 816

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
 
3
/* N1312 7.1.1: The FLOAT_CONST_DECIMAL64 pragma.
4
   C99 6.4.4.2a (New).
5
 
6
   Check that malformed versions of pragma STDC FLOAT_CONST_DECIMAL64
7
   are detected.  */
8
 
9
double a;
10
 
11
void f1 (void)
12
{
13
#pragma STDC FLOAT_CONST_DECIMAL64      /* { dg-warning "malformed" } */
14
  a = 1.0;
15
}
16
 
17
void f2 (void)
18
{
19
#pragma STDC FLOAT_CONST_DECIMAL64 DFP  /* { dg-warning "malformed" } */
20
  a = 2.0;
21
}
22
 
23
void f3 (void)
24
{
25
#pragma STDC FLOAT_CONST_DECIMAL64 ON DFP /* { dg-warning "junk at end" } */
26
  a = 3.0;
27
}
28
 
29
void f4 (void)
30
{
31
  _Pragma ( "STDC FLOAT_CONST_DECIMAL64" )      /* { dg-warning "malformed" } */
32
  a = 1.0;
33
}
34
 
35
void f5 (void)
36
{
37
  _Pragma ( "STDC FLOAT_CONST_DECIMAL64 DFP" )  /* { dg-warning "malformed" } */
38
  a = 2.0;
39
}
40
 
41
void f6 (void)
42
{
43
  _Pragma ( "STDC FLOAT_CONST_DECIMAL64 ON DFP" ) /* { dg-warning "junk at end" } */
44
  a = 3.0;
45
}

powered by: WebSVN 2.1.0

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