source:
CIVL/examples/languageFeatures/pointersBad.cvl@
5cf6652
| Last change on this file since 5cf6652 was 262ecde, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 227 bytes | |
| Rev | Line | |
|---|---|---|
| [262ecde] | 1 | /* Commandline execution: |
| 2 | * civl verify pointersBad.cvl | |
| 3 | * */ | |
| 4 | #include<civlc.cvh> | |
| 5 | #include<stdlib.h> | |
| 6 | ||
| 7 | $output int out; | |
| 8 | void main() { | |
| 9 | int a; | |
| 10 | int* b; | |
| 11 | ||
| 12 | b = (int *)malloc(sizeof(int)); | |
| 13 | free(b); | |
| 14 | a = *(&out); | |
| 15 | a = *b; | |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
