made to fit on a PDP-11
authorceriel <none@none>
Mon, 9 Nov 1987 10:17:20 +0000 (10:17 +0000)
committerceriel <none@none>
Mon, 9 Nov 1987 10:17:20 +0000 (10:17 +0000)
lang/m2/comp/chk_expr.c
lang/m2/comp/code.c
lang/m2/comp/declar.g
lang/m2/comp/error.c
lang/m2/comp/options.c
lang/m2/comp/type.c
lang/m2/comp/walk.c

index a0eafba..853f3ad 100644 (file)
@@ -33,6 +33,7 @@
 #include       "misc.h"
 #include       "warning.h"
 #include       "main.h"
+#include       "squeeze.h"
 
 extern char *symbol2str();
 extern char *sprint();
@@ -1175,10 +1176,12 @@ ChkStandard(expp)
                        return 0;
                }
                if (! IsConformantArray(left->nd_type)) cstcall(expp, S_SIZE);
+#ifndef SQUEEZE
                else node_warning(expp,
                                  W_STRICT,
                                  "%s on conformant array",
                                  expp->nd_left->nd_def->df_idf->id_text);
+#endif
                break;
 
        case S_TRUNCD:
index 3ce4feb..1767150 100644 (file)
@@ -207,28 +207,34 @@ CodeCoercion(t1, t2)
        switch(fund1) {
        case T_INTEGER:
                if (sz1 < word_size) {
-                       C_loc(sz1);
+                       c_loc((int)sz1);
                        c_loc((int) word_size);
                        C_cii();
                }
                switch(fund2) {
                case T_INTEGER:
-                       if (t2->tp_size != t1->tp_size) {
-                               C_loc(t1->tp_size);
-                               C_loc(t2->tp_size);
+#ifndef SQUEEZE
+                       if (t2->tp_size != t1->tp_size)
+#endif
+                       {
+                               c_loc((int)(t1->tp_size));
+                               c_loc((int)(t2->tp_size));
                                C_cii();
                        }
                        break;
                case T_CARDINAL:
-                       if (t1->tp_size != word_size) {
-                               C_loc(t1->tp_size);
+#ifndef SQUEEZE
+                       if (t1->tp_size != word_size)
+#endif
+                       {
+                               c_loc((int)(t1->tp_size));
                                c_loc((int) word_size);
                                C_ciu();
                        }
                        break;
                case T_REAL:
-                       C_loc(t1->tp_size);
-                       C_loc(t2->tp_size);
+                       c_loc((int)(t1->tp_size));
+                       c_loc((int)(t2->tp_size));
                        C_cif();
                        break;
                default:
@@ -243,20 +249,24 @@ CodeCoercion(t1, t2)
                case T_INTORCARD:
                        if (t2->tp_size > word_size) {
                                c_loc((int) word_size);
-                               C_loc(t2->tp_size);
+                               c_loc((int)(t2->tp_size));
                                C_cuu();
                        }
                        break;
                case T_INTEGER:
-                       if (fund1 == T_CARDINAL || t2->tp_size != word_size) {
+                       if (fund1 == T_CARDINAL
+#ifndef SQUEEZE
+                           || t2->tp_size != word_size
+#endif
+                          ) {
                                c_loc((int) word_size);
-                               C_loc(t2->tp_size);
+                               c_loc((int)(t2->tp_size));
                                C_cui();
                        }
                        break;
                case T_REAL:
                        c_loc((int) word_size);
-                       C_loc(t2->tp_size);
+                       c_loc((int)(t2->tp_size));
                        C_cuf();
                        break;
                default:
@@ -267,15 +277,18 @@ CodeCoercion(t1, t2)
        case T_REAL:
                switch(fund2) {
                case T_REAL:
-                       if (t2->tp_size != t1->tp_size) {
-                               C_loc(t1->tp_size);
-                               C_loc(t2->tp_size);
+#ifndef SQUEEZE
+                       if (t2->tp_size != t1->tp_size)
+#endif
+                       {
+                               c_loc((int)(t1->tp_size));
+                               c_loc((int)(t2->tp_size));
                                C_cff();
                        }
                        break;
                case T_INTEGER:
-                       C_loc(t1->tp_size);
-                       C_loc(t2->tp_size);
+                       c_loc((int)(t1->tp_size));
+                       c_loc((int)(t2->tp_size));
                        C_cfi();
                        break;
                case T_CARDINAL:
@@ -290,8 +303,8 @@ CodeCoercion(t1, t2)
                                C_trp();
                                C_df_ilb(lb);
                        }
-                       C_loc(t1->tp_size);
-                       C_loc(t2->tp_size);
+                       c_loc((int)(t1->tp_size));
+                       c_loc((int)(t2->tp_size));
                        C_cfu();
                        break;
                default:
index 7ad1890..650f975 100644 (file)
@@ -28,6 +28,7 @@
 #include       "main.h"
 #include       "chk_expr.h"
 #include       "warning.h"
+#include       "squeeze.h"
 
 int            proclevel = 0;          /* nesting level of procedures */
 int            return_occurred;        /* set if a return occurs in a block */
@@ -73,10 +74,12 @@ ProcedureHeading(t_def **pdf; int type;)
                ]?
        ]?
                        { CheckWithDef(*pdf, proc_type(tp, pr, parmaddr));
+#ifndef SQUEEZE
                          if (tp && IsConstructed(tp)) {
 warning(W_STRICT, "procedure \"%s\" has a constructed result type",
        (*pdf)->df_idf->id_text);
                          }
+#endif
                        }
 ;
 
index 3f97ef4..10bf8ca 100644 (file)
@@ -28,6 +28,7 @@
 #include       "main.h"
 #include       "node.h"
 #include       "warning.h"
+#include       "squeeze.h"
 
 /* error classes */
 #define        ERROR           1
@@ -176,9 +177,11 @@ _error(class, node, fmt, argv)
                        remark = "(old-fashioned use)";
                        break;
 #endif
+#ifndef SQUEEZE
                case W_STRICT:
                        remark = "(strict)";
                        break;
+#endif
                default:
                        remark = "(warning)";
                        break;
index 7854a3a..b9a277f 100644 (file)
@@ -19,6 +19,7 @@
 #include       "type.h"
 #include       "main.h"
 #include       "warning.h"
+#include       "squeeze.h"
 
 #define        MINIDFSIZE      14
 
@@ -60,9 +61,11 @@ DoOption(text)
                                        warning_classes &= ~W_OLDFASHIONED;
                                        break;
 #endif
+#ifndef SQUEEZE
                                case 'R':
                                        warning_classes &= ~W_STRICT;
                                        break;
+#endif
                                case 'W':
                                        warning_classes &= ~W_ORDINARY;
                                        break;
@@ -81,9 +84,11 @@ DoOption(text)
                                        warning_classes |= W_OLDFASHIONED;
                                        break;
 #endif
+#ifndef SQUEEZE
                                case 'R':
                                        warning_classes |= W_STRICT;
                                        break;
+#endif
                                case 'W':
                                        warning_classes |= W_ORDINARY;
                                        break;
index 862c1f5..9db3d36 100644 (file)
@@ -473,9 +473,11 @@ set_type(tp)
 
        getbounds(tp, &lb, &ub);
 
+#ifndef SQUEEZE
        if (lb < 0) {
                warning(W_STRICT, "base type of set has negative lower bound");
        }
+#endif
 
        diff = ub - lb + 1;
        if (diff < 0 || (sizeof(int) == 2 && diff > 65535)) {
index 46b3c68..f63ed28 100644 (file)
@@ -554,9 +554,13 @@ WalkStat(nd, exit_label)
                        nd->nd_def->df_flags &= ~D_FORLOOP;
                        if (good_forvar) {
                                if (! options['R']) {
+                                       label x = ++text_label;
                                        C_lol(tmp2);
                                        ForLoopVarExpr(nd);
-                                       C_cal("_forloopchk");
+                                       C_beq(x);
+                                       c_loc(M2_FORCH);
+                                       C_trp();
+                                       C_df_ilb(x);
                                        FreeInt(tmp2);
                                }
                                if (stepsize) {