source:
CIVL/mods/dev.civl.abc/examples/svcomp/void_star_add.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 181 bytes | |
| Line | |
|---|---|
| 1 | /* Tests pointer addition with a void* pointer, allowed in GNU-C */ |
| 2 | #include <assert.h> |
| 3 | |
| 4 | int main() { |
| 5 | int x; |
| 6 | void *p = &x; |
| 7 | int *q = p + sizeof(int); |
| 8 | assert(p == q - 1); |
| 9 | } |
| 10 |
Note:
See TracBrowser
for help on using the repository browser.
