fixed some minor problems
authorceriel <none@none>
Mon, 9 Nov 1987 16:11:04 +0000 (16:11 +0000)
committerceriel <none@none>
Mon, 9 Nov 1987 16:11:04 +0000 (16:11 +0000)
12 files changed:
lang/m2/comp/Makefile
lang/m2/comp/Parameters
lang/m2/comp/casestat.C
lang/m2/comp/chk_expr.c
lang/m2/comp/code.c
lang/m2/comp/declar.g
lang/m2/comp/desig.c
lang/m2/comp/error.c
lang/m2/comp/options.c
lang/m2/comp/type.c
lang/m2/comp/walk.c
lang/m2/comp/walk.h

index 663ccfb..4c62d25 100644 (file)
@@ -39,7 +39,7 @@ OBJ = $(COBJ) $(LOBJ) Lpars.o
 
 GENH=  errout.h\
        idfsize.h numsize.h strsize.h target_sizes.h \
-       inputtype.h density.h squeeze.h nocross.h \
+       inputtype.h density.h squeeze.h nocross.h nostrict.h \
        def.h debugcst.h type.h Lpars.h node.h desig.h strict3rd.h
 HFILES=                LLlex.h\
        chk_expr.h class.h const.h debug.h f_info.h idf.h\
index f1c9d59..127248d 100644 (file)
@@ -71,3 +71,9 @@
 #undef NOCROSS         1       /* define when cross-compiler not needed */
 
 
+!File: nostrict.h
+#undef NOSTRICT                1       /* define when STRICT warnings disabled
+                                  (yet another squeezing method)
+                               */
+
+
index 40d7e24..ec81d25 100644 (file)
@@ -24,7 +24,6 @@
 #include       <alloc.h>
 #include       <assert.h>
 
-#include       "squeeze.h"
 #include       "Lpars.h"
 #include       "type.h"
 #include       "LLlex.h"
index 853f3ad..f21e48f 100644 (file)
@@ -33,7 +33,7 @@
 #include       "misc.h"
 #include       "warning.h"
 #include       "main.h"
-#include       "squeeze.h"
+#include       "nostrict.h"
 
 extern char *symbol2str();
 extern char *sprint();
@@ -658,7 +658,10 @@ ChkFunCall(expp)
        /*      Check a call that must have a result
        */
 
-       if (! ChkCall(expp)) return 0;
+       if (! ChkCall(expp)) {
+               expp->nd_type = error_type;
+               return 0;
+       }
 
        if (expp->nd_type == 0) {
                node_error(expp, "function call expected");
@@ -1176,7 +1179,7 @@ ChkStandard(expp)
                        return 0;
                }
                if (! IsConformantArray(left->nd_type)) cstcall(expp, S_SIZE);
-#ifndef SQUEEZE
+#ifndef NOSTRICT
                else node_warning(expp,
                                  W_STRICT,
                                  "%s on conformant array",
index 1767150..ec27c51 100644 (file)
@@ -21,7 +21,6 @@
 #include       <assert.h>
 #include       <alloc.h>
 
-#include       "squeeze.h"
 #include       "type.h"
 #include       "LLlex.h"
 #include       "def.h"
index 650f975..aa53851 100644 (file)
@@ -28,7 +28,7 @@
 #include       "main.h"
 #include       "chk_expr.h"
 #include       "warning.h"
-#include       "squeeze.h"
+#include       "nostrict.h"
 
 int            proclevel = 0;          /* nesting level of procedures */
 int            return_occurred;        /* set if a return occurs in a block */
@@ -74,7 +74,7 @@ ProcedureHeading(t_def **pdf; int type;)
                ]?
        ]?
                        { CheckWithDef(*pdf, proc_type(tp, pr, parmaddr));
-#ifndef SQUEEZE
+#ifndef NOSTRICT
                          if (tp && IsConstructed(tp)) {
 warning(W_STRICT, "procedure \"%s\" has a constructed result type",
        (*pdf)->df_idf->id_text);
index 87d5e92..8aca3e4 100644 (file)
@@ -24,7 +24,6 @@
 #include       <assert.h>
 #include       <alloc.h>
 
-#include       "squeeze.h"
 #include       "type.h"
 #include       "LLlex.h"
 #include       "def.h"
index 10bf8ca..8ec5346 100644 (file)
@@ -28,7 +28,7 @@
 #include       "main.h"
 #include       "node.h"
 #include       "warning.h"
-#include       "squeeze.h"
+#include       "nostrict.h"
 
 /* error classes */
 #define        ERROR           1
@@ -177,7 +177,7 @@ _error(class, node, fmt, argv)
                        remark = "(old-fashioned use)";
                        break;
 #endif
-#ifndef SQUEEZE
+#ifndef NOSTRICT
                case W_STRICT:
                        remark = "(strict)";
                        break;
index 329c001..4f5b742 100644 (file)
@@ -19,7 +19,7 @@
 #include       "type.h"
 #include       "main.h"
 #include       "warning.h"
-#include       "squeeze.h"
+#include       "nostrict.h"
 #include       "nocross.h"
 
 #define        MINIDFSIZE      14
@@ -47,9 +47,7 @@ DoOption(text)
        case 'n':       /* no register messages */
        case 'x':       /* every name global */
        case 's':       /* symmetric: MIN(INTEGER) = -MAX(INTEGER) */
-#ifndef STRICT_3RD_ED
        case '3':       /* strict 3rd edition Modula-2 */
-#endif
                options[text[-1]]++;
                break;
 
@@ -62,7 +60,7 @@ DoOption(text)
                                        warning_classes &= ~W_OLDFASHIONED;
                                        break;
 #endif
-#ifndef SQUEEZE
+#ifndef NOSTRICT
                                case 'R':
                                        warning_classes &= ~W_STRICT;
                                        break;
@@ -85,7 +83,7 @@ DoOption(text)
                                        warning_classes |= W_OLDFASHIONED;
                                        break;
 #endif
-#ifndef SQUEEZE
+#ifndef NOSTRICT
                                case 'R':
                                        warning_classes |= W_STRICT;
                                        break;
index 20d927f..2ebf2bf 100644 (file)
@@ -17,7 +17,7 @@
 #include       <em_label.h>
 #include       <em_code.h>
 
-#include       "squeeze.h"
+#include       "nostrict.h"
 #include       "LLlex.h"
 #include       "def.h"
 #include       "type.h"
@@ -475,7 +475,7 @@ set_type(tp)
 
        getbounds(tp, &lb, &ub);
 
-#ifndef SQUEEZE
+#ifndef NOSTRICT
        if (lb < 0) {
                warning(W_STRICT, "base type of set has negative lower bound");
        }
index f63ed28..d148ac9 100644 (file)
@@ -24,7 +24,6 @@
 #include       <alloc.h>
 
 #include       "strict3rd.h"
-#include       "squeeze.h"
 #include       "LLlex.h"
 #include       "def.h"
 #include       "type.h"
index 2c9c9da..32e2b1b 100644 (file)
@@ -19,6 +19,8 @@ extern int (*WalkTable[])();
 extern label   text_label;
 extern label   data_label;
 
+#include "squeeze.h"
+
 #ifndef SQUEEZE
 #define c_loc(x)       C_loc((arith) (x))
 #define c_lae_dlb(x)   C_lae_dlb(x,(arith) 0)