summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wc90-c99-compat-5.c
blob: f41e960d87724c6e44605f631b80ddc3e2af6aa7 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* { dg-do compile } */
/* { dg-options "-std=gnu90 -pedantic-errors -Wno-c90-c99-compat" } */

_Bool b;
_Complex double c = __builtin_complex (0.0, 0.0);
long long l;
struct A { int i; char a[]; };
struct { long int b: 2; } s;
const const int i;
volatile volatile int v;

struct S { int a[2]; };
extern struct S foo (void);

enum { E, };

void fn1 (char [*]);

void
fn2 (char x[static 4])
{
  int i = (int) { 1 };
  struct A a = { .i = 3 };
}

void
fn3 (int n)
{
  n = 3;
  int i;
}

void
fn4 (int n)
{
  n = 3;
  __extension__ int i;
}

void
fn5 (void)
{
  (foo ()).a[0];
}

#define F(a) a

void
fn6 (void)
{
  F();
}

void fn7 (int n, int a[n]);