bug fix in local extern-declarations, some other minor changes
This commit is contained in:
parent
ed7105e2cf
commit
1fb8da7a02
4 changed files with 15 additions and 14 deletions
|
@ -23,16 +23,16 @@ ELIBS = $(INPLIB) $(EMMESLIB) $(EMELIB) $(PRTLIB) $(STRLIB) \
|
||||||
$(ALLOCLIB) $(MALLOC) $(SYSLIB)
|
$(ALLOCLIB) $(MALLOC) $(SYSLIB)
|
||||||
LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg
|
LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg
|
||||||
EM_INCLUDES = -I$(EMHOME)/h
|
EM_INCLUDES = -I$(EMHOME)/h
|
||||||
SYSLLIB = $(EMHOME)/modules/lib/llib-lsys.ln
|
SYSLLIB = $(EMHOME)/modules/lib/llib-lsystem.ln
|
||||||
EMKLLIB = $(EMHOME)/modules/lib/llib-lemk.ln
|
EMKLLIB = $(EMHOME)/modules/lib/llib-lemk.ln
|
||||||
EMELLIB = $(EMHOME)/modules/lib/llib-leme.ln
|
EMELLIB = $(EMHOME)/modules/lib/llib-leme.ln
|
||||||
STRLLIB = $(EMHOME)/modules/lib/llib-lstr.ln
|
STRLLIB = $(EMHOME)/modules/lib/llib-lstring.ln
|
||||||
PRTLLIB = $(EMHOME)/modules/lib/llib-lprint.ln
|
PRTLLIB = $(EMHOME)/modules/lib/llib-lprint.ln
|
||||||
EMMESLLIB = $(EMHOME)/modules/lib/llib-lmes.ln
|
EMMESLLIB = $(EMHOME)/modules/lib/llib-lem_mes.ln
|
||||||
INPLLIB = $(EMHOME)/modules/lib/llib-linput.ln
|
INPLLIB = $(EMHOME)/modules/lib/llib-linput.ln
|
||||||
ALLOCLLIB = $(EMHOME)/modules/lib/llib-lalloc.ln
|
ALLOCLLIB = $(EMHOME)/modules/lib/llib-lalloc.ln
|
||||||
LINTLIBS =
|
#LINTLIBS =
|
||||||
#LINTLIBS = $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(SYSLLIB) $(ALLOCLLIB)
|
LINTLIBS = $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(ALLOCLLIB) $(SYSLLIB)
|
||||||
CURRDIR = .
|
CURRDIR = .
|
||||||
|
|
||||||
COPTIONS =
|
COPTIONS =
|
||||||
|
|
|
@ -38,7 +38,6 @@ ch7bin(expp, oper, expr)
|
||||||
any2opnd(expp, oper);
|
any2opnd(expp, oper);
|
||||||
any2opnd(&expr, oper);
|
any2opnd(&expr, oper);
|
||||||
switch (oper) {
|
switch (oper) {
|
||||||
int fund;
|
|
||||||
case '[': /* RM 7.1 */
|
case '[': /* RM 7.1 */
|
||||||
/* RM 14.3 states that indexing follows the commutative laws */
|
/* RM 14.3 states that indexing follows the commutative laws */
|
||||||
switch ((*expp)->ex_type->tp_fund) {
|
switch ((*expp)->ex_type->tp_fund) {
|
||||||
|
@ -102,7 +101,7 @@ ch7bin(expp, oper, expr)
|
||||||
case '/':
|
case '/':
|
||||||
case DIVAB:
|
case DIVAB:
|
||||||
case TIMESAB:
|
case TIMESAB:
|
||||||
fund = arithbalance(expp, oper, &expr);
|
arithbalance(expp, oper, &expr);
|
||||||
non_commutative_binop(expp, oper, expr);
|
non_commutative_binop(expp, oper, expr);
|
||||||
break;
|
break;
|
||||||
case '&':
|
case '&':
|
||||||
|
@ -112,7 +111,7 @@ ch7bin(expp, oper, expr)
|
||||||
opnd2integral(&expr, oper);
|
opnd2integral(&expr, oper);
|
||||||
/* Fall through */
|
/* Fall through */
|
||||||
case '*':
|
case '*':
|
||||||
fund = arithbalance(expp, oper, &expr);
|
arithbalance(expp, oper, &expr);
|
||||||
commutative_binop(expp, oper, expr);
|
commutative_binop(expp, oper, expr);
|
||||||
break;
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
|
@ -132,7 +131,7 @@ ch7bin(expp, oper, expr)
|
||||||
pointer_binary(expp, oper, expr);
|
pointer_binary(expp, oper, expr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fund = arithbalance(expp, oper, &expr);
|
arithbalance(expp, oper, &expr);
|
||||||
if (oper == '+')
|
if (oper == '+')
|
||||||
commutative_binop(expp, oper, expr);
|
commutative_binop(expp, oper, expr);
|
||||||
else
|
else
|
||||||
|
@ -152,7 +151,7 @@ ch7bin(expp, oper, expr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fund = arithbalance(expp, oper, &expr);
|
arithbalance(expp, oper, &expr);
|
||||||
non_commutative_binop(expp, oper, expr);
|
non_commutative_binop(expp, oper, expr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -162,7 +161,7 @@ ch7bin(expp, oper, expr)
|
||||||
case RIGHTAB:
|
case RIGHTAB:
|
||||||
opnd2integral(expp, oper);
|
opnd2integral(expp, oper);
|
||||||
opnd2integral(&expr, oper);
|
opnd2integral(&expr, oper);
|
||||||
fund = arithbalance(expp, oper, &expr); /* ch. 7.5 */
|
arithbalance(expp, oper, &expr); /* ch. 7.5 */
|
||||||
ch7cast(&expr, oper, int_type); /* cvt. rightop to int */
|
ch7cast(&expr, oper, int_type); /* cvt. rightop to int */
|
||||||
non_commutative_binop(expp, oper, expr);
|
non_commutative_binop(expp, oper, expr);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -263,7 +263,11 @@ declare_idf(ds, dc, lvl)
|
||||||
warning("redeclaring reserved word %s", idf->id_text);
|
warning("redeclaring reserved word %s", idf->id_text);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (def && def->df_level >= lvl) {
|
if (def &&
|
||||||
|
( def->df_level == lvl ||
|
||||||
|
( lvl != L_GLOBAL && def->df_level > lvl )
|
||||||
|
)
|
||||||
|
) {
|
||||||
/* There is already a declaration for idf on this
|
/* There is already a declaration for idf on this
|
||||||
level, or even more inside.
|
level, or even more inside.
|
||||||
The rules differ for different levels.
|
The rules differ for different levels.
|
||||||
|
|
|
@ -337,9 +337,7 @@ check_and_pad(expp, tpp)
|
||||||
struct type **tpp;
|
struct type **tpp;
|
||||||
struct expr **expp;
|
struct expr **expp;
|
||||||
{
|
{
|
||||||
/* ex is of a fundamental type */
|
|
||||||
register struct type *tp = *tpp;
|
register struct type *tp = *tpp;
|
||||||
register struct expr *ex = *expp;
|
|
||||||
|
|
||||||
if (tp->tp_fund == ARRAY) {
|
if (tp->tp_fund == ARRAY) {
|
||||||
check_and_pad(expp, &(tp->tp_up)); /* first member */
|
check_and_pad(expp, &(tp->tp_up)); /* first member */
|
||||||
|
|
Loading…
Reference in a new issue