source:
CIVL/examples/languageFeatures/compoundInit6.c@
7d77e64
| Last change on this file since 7d77e64 was 8ed8eba, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 197 bytes | |
| Rev | Line | |
|---|---|---|
| [8ed8eba] | 1 | #include <assert.h> |
| 2 | union Node { | |
| 3 | union { | |
| 4 | int a; | |
| 5 | union { | |
| 6 | int b; | |
| 7 | union { | |
| 8 | int c; | |
| 9 | int d; | |
| 10 | }; | |
| 11 | }; | |
| 12 | }; | |
| 13 | }; | |
| 14 | int main() { | |
| 15 | union Node node = { .d=1 }; | |
| 16 | node.b; // error | |
| 17 | } |
Note:
See TracBrowser
for help on using the repository browser.
