source:
CIVL/mods/dev.civl.abc/examples/parse/c11_6.7.2.1.19.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 364 bytes | |
| Rev | Line | |
|---|---|---|
| [aad342c] | 1 | /* From C11 Sec. 6.7.2.1.19: |
| 2 | * | |
| 3 | * EXAMPLE 1 The following illustrates anonymous structures and unions: | |
| 4 | * ... | |
| 5 | * v1.i = 2; // valid | |
| 6 | * v1.k = 3; // invalid: inner structure is not anonymous | |
| 7 | * v1.w.k = 5; // valid | |
| 8 | */ | |
| 9 | ||
| 10 | struct v { | |
| 11 | union { // anonymous union | |
| 12 | struct { int i, j; }; // anonymous structure | |
| 13 | struct { long k, l;} w; | |
| 14 | }; | |
| 15 | int m; | |
| 16 | } v1; |
Note:
See TracBrowser
for help on using the repository browser.
