1 extern void marker_A(void); 2 extern void marker_B(void); 3 extern void marker_C(void); 4 extern void marker_D(void); 5 test(int flag)6void test(int flag) 7 { 8 marker_A(); 9 10 if (flag) { 11 marker_B(); 12 13 /* Recurse, infinitely, as it happens: */ 14 test(flag); 15 16 marker_C(); 17 } 18 19 marker_D(); 20 } 21 22 /* A cycle of 4 mutually-recursive functions (but only for certain inputs). */ 23 24 extern void mutual_test_1 (int flag); 25 extern void mutual_test_2 (int flag); 26 extern void mutual_test_3 (int flag); 27 extern void mutual_test_4 (int flag); 28 mutual_test_1(int flag)29void mutual_test_1 (int flag) 30 { 31 marker_A (); 32 if (flag) 33 mutual_test_2 (flag); 34 } 35 mutual_test_2(int flag)36void mutual_test_2 (int flag) 37 { 38 marker_B (); 39 if (flag) 40 mutual_test_3 (flag); 41 } 42 mutual_test_3(int flag)43void mutual_test_3 (int flag) 44 { 45 marker_C (); 46 if (flag) 47 mutual_test_4 (flag); 48 } 49 mutual_test_4(int flag)50void mutual_test_4 (int flag) 51 { 52 marker_D (); 53 if (flag) 54 mutual_test_1 (flag); 55 } 56