Removed # in commands, and a small fix in ch3mon.c
authorceriel <none@none>
Fri, 26 Jun 1992 11:57:17 +0000 (11:57 +0000)
committerceriel <none@none>
Fri, 26 Jun 1992 11:57:17 +0000 (11:57 +0000)
lang/cem/cemcom.ansi/ch3mon.c
lang/cem/cemcom.ansi/proto.make

index 0148e00..7a80b6d 100644 (file)
@@ -36,19 +36,14 @@ ch3mon(oper, expp)
        switch (oper)   {
        case '*':                       /* 3.3.3.2 */
                /* no FIELD type allowed        */
-               if ((*expp)->ex_type->tp_fund != POINTER) {
-                       if ((*expp)->ex_type != error_type) {
-                           expr_error(*expp,
+               expr = *expp;
+               if (expr->ex_type->tp_fund != POINTER) {
+                       if (expr->ex_type != error_type) {
+                           expr_error(expr,
                                    "* applied to non-pointer (%s)",
-                                   symbol2str((*expp)->ex_type->tp_fund));
+                                   symbol2str(expr->ex_type->tp_fund));
                        }
                } 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))
                                /* dereference in administration only */
                                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 != 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)
                                expr->ex_flags |= EX_READONLY;
                        if (expr->ex_type->tp_typequal & TQ_VOLATILE)
index 165444a..2ac31ba 100644 (file)
@@ -165,8 +165,7 @@ dependencies:       resolved
                do_deps `grep '.c$$' Cfiles`
 
 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
-               echo '#DEPENDENCIES' >> make.main
+               rm_deps $(SRC_DIR)/proto.main | sed -e '/^.PARAMS/r make_macros' -e '/^.LISTS/r lists' > make.main
                cat *.dep >> make.main
 
 make_macros:   Makefile
@@ -188,7 +187,7 @@ lists:              Cfiles
                echo "C_SRC = \\" > lists
                echo $(CFILES) >> 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:
                -make -f make.main clean