Project

General

Profile

Feature #3692 » test9.c

Evgeny Novikov, 03/19/2013 02:00 PM

 
struct B
{
int (*field)(int);
};
struct A
{
int field1;
int (*(*field2)(int))(int, int (*)(int, int));
struct B *field3;
struct B field4;
int (*field5)(int);
const char *field6;
int field7[3];
int field8[4][5];
struct B field9[2];
int (*field10[2])(int);
};
int (*func(int arg))(int, int (*)(int, int))
{
return arg;
}
int gunc(int);

struct B var1;
struct A var2 = {
.field1 = 10
, .field2 = func
, .field3 = &var1
, .field4 = { .field = gunc }
, .field5 = 0
, .field6 = "driver"
, .field7 = { [1] = 30, [2] = 40 }
, .field8 = { [3] = { [4] = 50 } }
, .field9 = { [1] = { gunc } }
, .field10 = { gunc, gunc }
};
int var3[6] = { [5] = 60 };
int var4 = 70;
struct A var5[] = {
{ .field2 = func }
, { .field5 = gunc }
};
struct A *var6 = &var2;

(6-6/11)