fixed some minor problems
This commit is contained in:
parent
7b317f79e2
commit
4489526a11
|
@ -39,7 +39,7 @@ OBJ = $(COBJ) $(LOBJ) Lpars.o
|
||||||
|
|
||||||
GENH= errout.h\
|
GENH= errout.h\
|
||||||
idfsize.h numsize.h strsize.h target_sizes.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
|
def.h debugcst.h type.h Lpars.h node.h desig.h strict3rd.h
|
||||||
HFILES= LLlex.h\
|
HFILES= LLlex.h\
|
||||||
chk_expr.h class.h const.h debug.h f_info.h idf.h\
|
chk_expr.h class.h const.h debug.h f_info.h idf.h\
|
||||||
|
|
|
@ -71,3 +71,9 @@
|
||||||
#undef NOCROSS 1 /* define when cross-compiler not needed */
|
#undef NOCROSS 1 /* define when cross-compiler not needed */
|
||||||
|
|
||||||
|
|
||||||
|
!File: nostrict.h
|
||||||
|
#undef NOSTRICT 1 /* define when STRICT warnings disabled
|
||||||
|
(yet another squeezing method)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "squeeze.h"
|
|
||||||
#include "Lpars.h"
|
#include "Lpars.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "warning.h"
|
#include "warning.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "squeeze.h"
|
#include "nostrict.h"
|
||||||
|
|
||||||
extern char *symbol2str();
|
extern char *symbol2str();
|
||||||
extern char *sprint();
|
extern char *sprint();
|
||||||
|
@ -658,7 +658,10 @@ ChkFunCall(expp)
|
||||||
/* Check a call that must have a result
|
/* 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) {
|
if (expp->nd_type == 0) {
|
||||||
node_error(expp, "function call expected");
|
node_error(expp, "function call expected");
|
||||||
|
@ -1176,7 +1179,7 @@ ChkStandard(expp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (! IsConformantArray(left->nd_type)) cstcall(expp, S_SIZE);
|
if (! IsConformantArray(left->nd_type)) cstcall(expp, S_SIZE);
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
else node_warning(expp,
|
else node_warning(expp,
|
||||||
W_STRICT,
|
W_STRICT,
|
||||||
"%s on conformant array",
|
"%s on conformant array",
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
|
|
||||||
#include "squeeze.h"
|
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "chk_expr.h"
|
#include "chk_expr.h"
|
||||||
#include "warning.h"
|
#include "warning.h"
|
||||||
#include "squeeze.h"
|
#include "nostrict.h"
|
||||||
|
|
||||||
int proclevel = 0; /* nesting level of procedures */
|
int proclevel = 0; /* nesting level of procedures */
|
||||||
int return_occurred; /* set if a return occurs in a block */
|
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));
|
{ CheckWithDef(*pdf, proc_type(tp, pr, parmaddr));
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
if (tp && IsConstructed(tp)) {
|
if (tp && IsConstructed(tp)) {
|
||||||
warning(W_STRICT, "procedure \"%s\" has a constructed result type",
|
warning(W_STRICT, "procedure \"%s\" has a constructed result type",
|
||||||
(*pdf)->df_idf->id_text);
|
(*pdf)->df_idf->id_text);
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
|
|
||||||
#include "squeeze.h"
|
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
#include "warning.h"
|
#include "warning.h"
|
||||||
#include "squeeze.h"
|
#include "nostrict.h"
|
||||||
|
|
||||||
/* error classes */
|
/* error classes */
|
||||||
#define ERROR 1
|
#define ERROR 1
|
||||||
|
@ -177,7 +177,7 @@ _error(class, node, fmt, argv)
|
||||||
remark = "(old-fashioned use)";
|
remark = "(old-fashioned use)";
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
case W_STRICT:
|
case W_STRICT:
|
||||||
remark = "(strict)";
|
remark = "(strict)";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "warning.h"
|
#include "warning.h"
|
||||||
#include "squeeze.h"
|
#include "nostrict.h"
|
||||||
#include "nocross.h"
|
#include "nocross.h"
|
||||||
|
|
||||||
#define MINIDFSIZE 14
|
#define MINIDFSIZE 14
|
||||||
|
@ -47,9 +47,7 @@ DoOption(text)
|
||||||
case 'n': /* no register messages */
|
case 'n': /* no register messages */
|
||||||
case 'x': /* every name global */
|
case 'x': /* every name global */
|
||||||
case 's': /* symmetric: MIN(INTEGER) = -MAX(INTEGER) */
|
case 's': /* symmetric: MIN(INTEGER) = -MAX(INTEGER) */
|
||||||
#ifndef STRICT_3RD_ED
|
|
||||||
case '3': /* strict 3rd edition Modula-2 */
|
case '3': /* strict 3rd edition Modula-2 */
|
||||||
#endif
|
|
||||||
options[text[-1]]++;
|
options[text[-1]]++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -62,7 +60,7 @@ DoOption(text)
|
||||||
warning_classes &= ~W_OLDFASHIONED;
|
warning_classes &= ~W_OLDFASHIONED;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
case 'R':
|
case 'R':
|
||||||
warning_classes &= ~W_STRICT;
|
warning_classes &= ~W_STRICT;
|
||||||
break;
|
break;
|
||||||
|
@ -85,7 +83,7 @@ DoOption(text)
|
||||||
warning_classes |= W_OLDFASHIONED;
|
warning_classes |= W_OLDFASHIONED;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
case 'R':
|
case 'R':
|
||||||
warning_classes |= W_STRICT;
|
warning_classes |= W_STRICT;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <em_label.h>
|
#include <em_label.h>
|
||||||
#include <em_code.h>
|
#include <em_code.h>
|
||||||
|
|
||||||
#include "squeeze.h"
|
#include "nostrict.h"
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
@ -475,7 +475,7 @@ set_type(tp)
|
||||||
|
|
||||||
getbounds(tp, &lb, &ub);
|
getbounds(tp, &lb, &ub);
|
||||||
|
|
||||||
#ifndef SQUEEZE
|
#ifndef NOSTRICT
|
||||||
if (lb < 0) {
|
if (lb < 0) {
|
||||||
warning(W_STRICT, "base type of set has negative lower bound");
|
warning(W_STRICT, "base type of set has negative lower bound");
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include <alloc.h>
|
#include <alloc.h>
|
||||||
|
|
||||||
#include "strict3rd.h"
|
#include "strict3rd.h"
|
||||||
#include "squeeze.h"
|
|
||||||
#include "LLlex.h"
|
#include "LLlex.h"
|
||||||
#include "def.h"
|
#include "def.h"
|
||||||
#include "type.h"
|
#include "type.h"
|
||||||
|
|
|
@ -19,6 +19,8 @@ extern int (*WalkTable[])();
|
||||||
extern label text_label;
|
extern label text_label;
|
||||||
extern label data_label;
|
extern label data_label;
|
||||||
|
|
||||||
|
#include "squeeze.h"
|
||||||
|
|
||||||
#ifndef SQUEEZE
|
#ifndef SQUEEZE
|
||||||
#define c_loc(x) C_loc((arith) (x))
|
#define c_loc(x) C_loc((arith) (x))
|
||||||
#define c_lae_dlb(x) C_lae_dlb(x,(arith) 0)
|
#define c_lae_dlb(x) C_lae_dlb(x,(arith) 0)
|
||||||
|
|
Loading…
Reference in a new issue