diff options
Diffstat (limited to 'lcc/src/types.c')
-rw-r--r-- | lcc/src/types.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lcc/src/types.c b/lcc/src/types.c index 207cdb5..4aa3d18 100644 --- a/lcc/src/types.c +++ b/lcc/src/types.c @@ -233,8 +233,8 @@ Type qual(int op, Type ty) { ty->align, NULL); else if (isfunc(ty)) warning("qualified function type ignored\n"); - else if (isconst(ty) && op == CONST - || isvolatile(ty) && op == VOLATILE) + else if ((isconst(ty) && op == CONST) + || (isvolatile(ty) && op == VOLATILE)) error("illegal type `%k %t'\n", op, ty); else { if (isqual(ty)) { @@ -276,7 +276,7 @@ Type newstruct(int op, char *tag) { tag = stringd(genlabel(1)); else if ((p = lookup(tag, types)) != NULL && (p->scope == level - || p->scope == PARAM && level == PARAM+1)) { + || (p->scope == PARAM && level == PARAM+1))) { if (p->type->op == op && !p->defined) return p->type; error("redefinition of `%s' previously defined at %w\n", @@ -400,7 +400,7 @@ Type compose(Type ty1, Type ty2) { case CONST: case VOLATILE: return qual(ty1->op, compose(ty1->type, ty2->type)); case ARRAY: { Type ty = compose(ty1->type, ty2->type); - if (ty1->size && (ty1->type->size && ty2->size == 0 || ty1->size == ty2->size)) + if (ty1->size && ((ty1->type->size && ty2->size == 0) || ty1->size == ty2->size)) return array(ty, ty1->size/ty1->type->size, ty1->align); if (ty2->size && ty2->type->size && ty1->size == 0) return array(ty, ty2->size/ty2->type->size, ty2->align); |