ctrump/parser/test/c99-designated-initializers.c File Reference

Go to the source code of this file.

Data Structures

struct  S
struct  Point

Typedefs

typedef struct Point PointVector [4]

Variables

int a1 [5] = { [2] = 100, [1] = 3 }
int a2 [5] = { [0] = 10, [2] = -2, -1, -3 }
int a3 [] = { 1, 2, 3, [2] = 5, 6, 7 }
struct S s1 = { .c = "abc" }
struct S s2 = { 13, 3.3, "xxx", .b = 4.5 }
struct S s3 = { .c = {'a', 'b', 'c', '\0'} }
PointVector pv1


Typedef Documentation

typedef struct Point PointVector[4]

Definition at line 31 of file c99-designated-initializers.c.


Variable Documentation

int a1[5] = { [2] = 100, [1] = 3 }

int a2[5] = { [0] = 10, [2] = -2, -1, -3 }

Definition at line 5 of file c99-designated-initializers.c.

Referenced by CParserTest::testAddNameAndTypeArray().

int a3[] = { 1, 2, 3, [2] = 5, 6, 7 }

Definition at line 8 of file c99-designated-initializers.c.

Initial value:

 {
    [0].x = 1, [0].y = 2, [0].z = 3,
    [1] = {.x = 11, .y = 12, .z = 13},
    [3] = {.y = 3 } }

Definition at line 34 of file c99-designated-initializers.c.

struct S s1 = { .c = "abc" }

struct S s2 = { 13, 3.3, "xxx", .b = 4.5 }

struct S s3 = { .c = {'a', 'b', 'c', '\0'} }

Definition at line 24 of file c99-designated-initializers.c.

Referenced by f(), and CParserTest::testAddNameAndTypeBasic().


Generated on Tue Mar 31 20:19:25 2009 for ctrump by  doxygen 1.5.6