fixed some minor problems

This commit is contained in:
ceriel 1987-11-09 16:11:04 +00:00
parent 7b317f79e2
commit 4489526a11
12 changed files with 24 additions and 19 deletions

View 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\

View 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)
*/

View file

@ -24,7 +24,6 @@
#include <alloc.h>
#include <assert.h>
#include "squeeze.h"
#include "Lpars.h"
#include "type.h"
#include "LLlex.h"

View 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",

View file

@ -21,7 +21,6 @@
#include <assert.h>
#include <alloc.h>
#include "squeeze.h"
#include "type.h"
#include "LLlex.h"
#include "def.h"

View 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);

View file

@ -24,7 +24,6 @@
#include <assert.h>
#include <alloc.h>
#include "squeeze.h"
#include "type.h"
#include "LLlex.h"
#include "def.h"

View 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;

View 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;

View 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");
}

View file

@ -24,7 +24,6 @@
#include <alloc.h>
#include "strict3rd.h"
#include "squeeze.h"
#include "LLlex.h"
#include "def.h"
#include "type.h"

View 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)