summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fixed-point/keywords-reserved.c
blob: 63b6349820fd239d3a638620793daed83f03937e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */

/* N1169 6.4.1: Keywords.
   C99 6.4.1(2): Keywords.
   Fixed-point keywords cannot be used in other contexts.  */

int _Fract (void)		/* { dg-error "" } */
{
  return 0;
}

int _Accum (void)		/* { dg-error "" } */
{
  return 0;
}

int _Sat (void)			/* { dg-error "" } */
{
  return 0;
}

int foo1 (int i)
{
  int _Fract = i * 2;		/* { dg-error "" } */
  return _Fract;		/* { dg-error "" } */
}

int foo2 (int i)
{
  int _Accum = i * 2;		/* { dg-error "" } */
  return _Accum;		/* { dg-error "" } */
}

int foo3 (int i)
{
  int _Sat = i * 2;		/* { dg-error "" } */
  return _Sat;			/* { dg-error "" } */
}