Removed # in commands, and a small fix in ch3mon.c

This commit is contained in:
ceriel 1992-06-26 11:57:17 +00:00
parent 2f2b6ccadf
commit ebdbabcedd
2 changed files with 10 additions and 13 deletions

View file

@ -36,19 +36,14 @@ ch3mon(oper, expp)
switch (oper) { switch (oper) {
case '*': /* 3.3.3.2 */ case '*': /* 3.3.3.2 */
/* no FIELD type allowed */ /* no FIELD type allowed */
if ((*expp)->ex_type->tp_fund != POINTER) { expr = *expp;
if ((*expp)->ex_type != error_type) { if (expr->ex_type->tp_fund != POINTER) {
expr_error(*expp, if (expr->ex_type != error_type) {
expr_error(expr,
"* applied to non-pointer (%s)", "* applied to non-pointer (%s)",
symbol2str((*expp)->ex_type->tp_fund)); symbol2str(expr->ex_type->tp_fund));
} }
} else { } else {
expr = *expp;
if (expr->ex_type->tp_up->tp_fund != FUNCTION &&
expr->ex_type->tp_up->tp_size <= 0) {
expr_error(expr, "incomplete type in expression");
}
if (is_ld_cst(expr)) if (is_ld_cst(expr))
/* dereference in administration only */ /* dereference in administration only */
expr->ex_type = expr->ex_type->tp_up; expr->ex_type = expr->ex_type->tp_up;
@ -60,6 +55,9 @@ ch3mon(oper, expp)
expr->ex_type->tp_fund != ARRAY && expr->ex_type->tp_fund != ARRAY &&
expr->ex_type->tp_fund != FUNCTION expr->ex_type->tp_fund != FUNCTION
); );
if (expr->ex_lvalue && expr->ex_type->tp_size <= 0) {
expr_error(expr, "incomplete type in expression");
}
if (expr->ex_type->tp_typequal & TQ_CONST) if (expr->ex_type->tp_typequal & TQ_CONST)
expr->ex_flags |= EX_READONLY; expr->ex_flags |= EX_READONLY;
if (expr->ex_type->tp_typequal & TQ_VOLATILE) if (expr->ex_type->tp_typequal & TQ_VOLATILE)

View file

@ -165,8 +165,7 @@ dependencies: resolved
do_deps `grep '.c$$' Cfiles` do_deps `grep '.c$$' Cfiles`
make.main: dependencies make_macros lists $(SRC_DIR)/proto.main make.main: dependencies make_macros lists $(SRC_DIR)/proto.main
sed -e '/^#DEPENDENCIES/,$$d' -e '/^#PARAMS/r make_macros' -e '/^#LISTS/r lists' $(SRC_DIR)/proto.main > make.main rm_deps $(SRC_DIR)/proto.main | sed -e '/^.PARAMS/r make_macros' -e '/^.LISTS/r lists' > make.main
echo '#DEPENDENCIES' >> make.main
cat *.dep >> make.main cat *.dep >> make.main
make_macros: Makefile make_macros: Makefile
@ -188,7 +187,7 @@ lists: Cfiles
echo "C_SRC = \\" > lists echo "C_SRC = \\" > lists
echo $(CFILES) >> lists echo $(CFILES) >> lists
echo "OBJ = \\" >> lists echo "OBJ = \\" >> lists
echo $(CFILES) | sed -e 's#[^ ]*/##g' -e 's/\.c/.$$(SUF)/g' >> lists echo $(CFILES) | sed -e 's|[^ ]*/||g' -e 's/\.c/.$$(SUF)/g' >> lists
clean: clean:
-make -f make.main clean -make -f make.main clean