source:
CIVL/examples/library/pointer/incompatiblePointerTranslation_dir/incompatiblePointerTranslationComplexFix.cvl@
a0b7ab5
| Last change on this file since a0b7ab5 was f6d137c, checked in by , 9 years ago | |
|---|---|
|
|
| File size: 206 bytes | |
| Rev | Line | |
|---|---|---|
| [f6d137c] | 1 | #include <pointer.cvh> |
| 2 | ||
| 3 | int main() { | |
| 4 | struct _3int { | |
| 5 | int x; | |
| 6 | union _2int { | |
| 7 | int a; | |
| 8 | int b; | |
| 9 | } y; | |
| 10 | } c1, c2; | |
| 11 | ||
| 12 | int * p = &c1.y.a; | |
| 13 | int * q = $translate_ptr(p, &c2); | |
| 14 | ||
| 15 | return *p; | |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
