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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [fixed-point/] [keywords-reserved.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-std=gnu99" } */
3
 
4
/* N1169 6.4.1: Keywords.
5
   C99 6.4.1(2): Keywords.
6
   Fixed-point keywords cannot be used in other contexts.  */
7
 
8
int _Fract (void)               /* { dg-error "" } */
9
{
10
  return 0;
11
}
12
 
13
int _Accum (void)               /* { dg-error "" } */
14
{
15
  return 0;
16
}
17
 
18
int _Sat (void)                 /* { dg-error "" } */
19
{
20
  return 0;
21
}
22
 
23
int foo1 (int i)
24
{
25
  int _Fract = i * 2;           /* { dg-error "" } */
26
  return _Fract;                /* { dg-error "" } */
27
}
28
 
29
int foo2 (int i)
30
{
31
  int _Accum = i * 2;           /* { dg-error "" } */
32
  return _Accum;                /* { dg-error "" } */
33
}
34
 
35
int foo3 (int i)
36
{
37
  int _Sat = i * 2;             /* { dg-error "" } */
38
  return _Sat;                  /* { dg-error "" } */
39
}

powered by: WebSVN 2.1.0

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