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)
|
||||
LIB_INCLUDES = -I$(EMHOME)/modules/h -I$(EMHOME)/modules/pkg
|
||||
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
|
||||
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
|
||||
EMMESLLIB = $(EMHOME)/modules/lib/llib-lmes.ln
|
||||
EMMESLLIB = $(EMHOME)/modules/lib/llib-lem_mes.ln
|
||||
INPLLIB = $(EMHOME)/modules/lib/llib-linput.ln
|
||||
ALLOCLLIB = $(EMHOME)/modules/lib/llib-lalloc.ln
|
||||
LINTLIBS =
|
||||
#LINTLIBS = $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(SYSLLIB) $(ALLOCLLIB)
|
||||
#LINTLIBS =
|
||||
LINTLIBS = $(EMMESLLIB) $(EMKLLIB) $(PRTLLIB) $(STRLLIB) $(ALLOCLLIB) $(SYSLLIB)
|
||||
CURRDIR = .
|
||||
|
||||
COPTIONS =
|
||||
|
|
|
@ -38,7 +38,6 @@ ch7bin(expp, oper, expr)
|
|||
any2opnd(expp, oper);
|
||||
any2opnd(&expr, oper);
|
||||
switch (oper) {
|
||||
int fund;
|
||||
case '[': /* RM 7.1 */
|
||||
/* RM 14.3 states that indexing follows the commutative laws */
|
||||
switch ((*expp)->ex_type->tp_fund) {
|
||||
|
@ -102,7 +101,7 @@ ch7bin(expp, oper, expr)
|
|||
case '/':
|
||||
case DIVAB:
|
||||
case TIMESAB:
|
||||
fund = arithbalance(expp, oper, &expr);
|
||||
arithbalance(expp, oper, &expr);
|
||||
non_commutative_binop(expp, oper, expr);
|
||||
break;
|
||||
case '&':
|
||||
|
@ -112,7 +111,7 @@ ch7bin(expp, oper, expr)
|
|||
opnd2integral(&expr, oper);
|
||||
/* Fall through */
|
||||
case '*':
|
||||
fund = arithbalance(expp, oper, &expr);
|
||||
arithbalance(expp, oper, &expr);
|
||||
commutative_binop(expp, oper, expr);
|
||||
break;
|
||||
case '+':
|
||||
|
@ -132,7 +131,7 @@ ch7bin(expp, oper, expr)
|
|||
pointer_binary(expp, oper, expr);
|
||||
}
|
||||
else {
|
||||
fund = arithbalance(expp, oper, &expr);
|
||||
arithbalance(expp, oper, &expr);
|
||||
if (oper == '+')
|
||||
commutative_binop(expp, oper, expr);
|
||||
else
|
||||
|
@ -152,7 +151,7 @@ ch7bin(expp, oper, expr)
|
|||
}
|
||||
}
|
||||
else {
|
||||
fund = arithbalance(expp, oper, &expr);
|
||||
arithbalance(expp, oper, &expr);
|
||||
non_commutative_binop(expp, oper, expr);
|
||||
}
|
||||
break;
|
||||
|
@ -162,7 +161,7 @@ ch7bin(expp, oper, expr)
|
|||
case RIGHTAB:
|
||||
opnd2integral(expp, 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 */
|
||||
non_commutative_binop(expp, oper, expr);
|
||||
break;
|
||||
|
|
|
@ -263,7 +263,11 @@ declare_idf(ds, dc, lvl)
|
|||
warning("redeclaring reserved word %s", idf->id_text);
|
||||
}
|
||||
#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
|
||||
level, or even more inside.
|
||||
The rules differ for different levels.
|
||||
|
|
|
@ -337,9 +337,7 @@ check_and_pad(expp, tpp)
|
|||
struct type **tpp;
|
||||
struct expr **expp;
|
||||
{
|
||||
/* ex is of a fundamental type */
|
||||
register struct type *tp = *tpp;
|
||||
register struct expr *ex = *expp;
|
||||
|
||||
if (tp->tp_fund == ARRAY) {
|
||||
check_and_pad(expp, &(tp->tp_up)); /* first member */
|
||||
|
|
Loading…
Reference in a new issue