some minor corrections
authorceriel <none@none>
Wed, 19 Aug 1987 15:23:41 +0000 (15:23 +0000)
committerceriel <none@none>
Wed, 19 Aug 1987 15:23:41 +0000 (15:23 +0000)
lang/cem/cemcom/arith.c
lang/cem/cemcom/cstoper.c
lang/cem/cemcom/declar.g
lang/cem/cemcom/ival.g

index e96b383..e07a2dc 100644 (file)
@@ -245,10 +245,10 @@ int2int(expp, tp)
                        */
                        extern long full_mask[];
                        long remainder = exp->VL_VALUE &
-                                               ~full_mask[tp->tp_size];
+                                               ~full_mask[(int)(tp->tp_size)];
 
                        if (remainder == 0 ||
-                           remainder == ~full_mask[tp->tp_size]) {
+                           remainder == ~full_mask[(int)(tp->tp_size)]) {
                                exp->VL_VALUE &= ~remainder;
                        }
                }
index b561225..0208e19 100644 (file)
@@ -232,6 +232,6 @@ init_cst()
        mach_long_sign = 1L << (mach_long_size * 8 - 1);
        if (long_size < mach_long_size)
                fatal("sizeof (long) insufficient on this machine");
-       max_int = full_mask[int_size] & ~(1L << (int_size * 8 - 1));
-       max_unsigned = full_mask[int_size];
+       max_int = full_mask[(int)int_size] & ~(1L << (int_size * 8 - 1));
+       max_unsigned = full_mask[(int)int_size];
 }
index 15bdb1d..0453d84 100644 (file)
@@ -125,6 +125,8 @@ single_type_specifier(register struct decspecs *ds;):
 |
        IDENTIFIER
        {error("%s is not a type identifier", dot.tk_idf->id_text);
+        dot.tk_idf->id_def->df_type = error_type;
+        dot.tk_idf->id_def->df_sc = TYPEDEF;
         ds->ds_type = error_type;
        }
 |
index 77d3fd1..35557de 100644 (file)
@@ -554,7 +554,6 @@ ch_array(tpp, ex)
        }
        else {
                arith dim = tp->tp_size / tp->tp_up->tp_size;
-               extern char options[];
 
                if (length > dim) {
                        expr_warning(ex, "too many initialisers");
@@ -578,10 +577,10 @@ str_cst(str, len)
        register char *str;
        register int len;
 {
-       arith chunksize = ((127 + word_size) / word_size) * word_size;
+       int chunksize = ((127 + (int) word_size) / (int) word_size) * (int) word_size;
 
        while (len > chunksize) {
-               C_con_scon(str, chunksize);
+               C_con_scon(str, (arith) chunksize);
                len -= chunksize;
                str += chunksize;
        }