source:
CIVL/mods/dev.civl.com/examples/library/pointer/incompatiblePointerTranslation_dir/incompatiblePointerTranslationComplexFix.cvl@
8553be8
| Last change on this file since 8553be8 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 206 bytes | |
| Line | |
|---|---|
| 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.
