if (! ChkDesignator(left)) return 0;
- if ((left->nd_type->tp_fund != T_RECORD ||
+ if ((left->nd_class==Def || left->nd_class==LinkDef) &&
+ (left->nd_type->tp_fund != T_RECORD ||
!(left->nd_def->df_kind & (D_MODULE|D_VARIABLE|D_FIELD))
)
) {
}
}
- if (left->nd_def->df_kind == D_MODULE) {
+ if ((left->nd_class == Def || left->nd_class == LinkDef) &&
+ left->nd_def->df_kind == D_MODULE) {
expp->nd_class = Def;
FreeNode(left);
expp->nd_left = 0;
assert(expp->nd_class == Def);
- return df->df_kind != D_ERROR;
+ return expp->nd_def->df_kind != D_ERROR;
}
STATIC int
id->id_text);
}
else if (df == Defined && level == 1) {
- error("cannot import from currently defined module");
+ error("cannot import from current module \"%s\"", id->id_text);
df->df_kind = D_ERROR;
}
FileName = fn;
/* Do a block move
*/
struct desig l, r;
+ arith sz;
sz = (size / word_size) * word_size;
l = *lhs; r = *rhs;
CodeAddress(&r);
CodeAddress(&l);
- C_blm(sz);
+ C_blm((arith) sz);
rhs->dsg_offset += sz;
lhs->dsg_offset += sz;
size -= sz;
/* Then copy dwords, words.
Depend on peephole optimizer
*/
- CodeCopy(lhs, rhs, sz, &size);
+ CodeCopy(lhs, rhs, (arith) sz, &size);
}
}
sz = word_size;
while (size && --sz) {
/* And then copy remaining parts
*/
- while (word_size % sz) sz--;
+ while ((int) word_size % sz) sz--;
while (size >= sz) {
- CodeCopy(lhs, rhs, sz, &size);
+ CodeCopy(lhs, rhs, (arith) sz, &size);
}
}
return;