source:
CIVL/examples/modelbuilder/block_scope_extern.c@
afc300c
| Last change on this file since afc300c was bfb3278, checked in by , 8 years ago | |
|---|---|
|
|
| File size: 173 bytes | |
| Rev | Line | |
|---|---|---|
| [bfb3278] | 1 | #include <assert.h> |
| 2 | ||
| 3 | int f() { | |
| 4 | int x = 0; // no linkage | |
| 5 | ||
| 6 | if (1 > 0) { | |
| 7 | extern int x; | |
| 8 | ||
| 9 | assert(x == 9); | |
| 10 | } | |
| 11 | return x; | |
| 12 | } | |
| 13 | ||
| 14 | int x = 9; | |
| 15 | ||
| 16 | int main() { | |
| 17 | return f(); | |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
