diff --git a/lang/m2/libm2/FORchk.c b/lang/m2/libm2/FORchk.c new file mode 100644 index 000000000..f911e2955 --- /dev/null +++ b/lang/m2/libm2/FORchk.c @@ -0,0 +1,8 @@ +static char m[] = "Warning: FOR-loop control variable was changed in the body"; +_forloopchk(a,b) + unsigned a, b; +{ + if (a != b) { + Traps_Message(m , 0, sizeof(m) - 2, 1); + } +} diff --git a/lang/m2/libm2/LIST b/lang/m2/libm2/LIST index f9bd631de..ab3d139b6 100644 --- a/lang/m2/libm2/LIST +++ b/lang/m2/libm2/LIST @@ -16,6 +16,7 @@ Semaphores.mod random.mod Strings.mod catch.c +FORchk.c Traps.mod Arguments.c LtoUset.e