main
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Expected result are:
|
|---|
| 3 | * main calls {main, foo, bar} <- due to imprecision
|
|---|
| 4 | * foo called by {main}
|
|---|
| 5 | * bar called by {main}
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | int foo() {
|
|---|
| 9 | return 0;
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | int bar() {
|
|---|
| 13 | return 1;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | // not included as a callee of main due to parameter
|
|---|
| 17 | int bat(int x) {
|
|---|
| 18 | return x;
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | // not included as a callee of main due return type
|
|---|
| 22 | double bas() {
|
|---|
| 23 | return 0.0;
|
|---|
| 24 | }
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | int main() {
|
|---|
| 28 | int (*fun)(void) = foo;
|
|---|
| 29 | int x = (fun)();
|
|---|
| 30 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.