Liste des Groupes | Revenir à theory |
Am Sun, 09 Jun 2024 11:07:19 -0500 schrieb olcott:You chopped out the mandatory prerequisite.typedef void (*ptr)(); // pointer to void function
01 void HHH(ptr P, ptr I)
02 {
03 P(I);
04 return;
05 }
06 07 void DDD(int (*x)())
08 {
09 HHH(x, x);
10 return;
11 }
12 13 int main()
14 {
15 HHH(DDD,DDD);
16 }
17In the above Neither DDD nor HHH ever reach their own return statement
thus never halt.
Most of my reviewers incorrectly believe that when HH(DD,DD) aborts its
simulated input that this simulated input halts.
Les messages affichés proviennent d'usenet.