From 45d6a88841f0db650d615522b1f6594ea72ceb7e Mon Sep 17 00:00:00 2001 From: tma Date: Tue, 4 Oct 2005 01:21:34 +0000 Subject: * Dewarninged the lcc and q3asm source * Removed traditional target platforms from the lcc build. This might break building lcc on Windows using nmake. Submit patches or be quiet :p * Default target for lcc is now bytecode, so -Wf-target=bytecode is no longer needed on the lcc command line git-svn-id: svn://svn.icculus.org/quake3/trunk@132 edf5b092-35ff-0310-97b2-ce42778d08ea --- lcc/src/expr.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lcc/src/expr.c') diff --git a/lcc/src/expr.c b/lcc/src/expr.c index 79f8f40..f20a090 100644 --- a/lcc/src/expr.c +++ b/lcc/src/expr.c @@ -230,13 +230,13 @@ static Tree unary(void) { pty = p->type; if (isenum(pty)) pty = pty->type; - if (isarith(pty) && isarith(ty) - || isptr(pty) && isptr(ty)) { + if ((isarith(pty) && isarith(ty)) + || (isptr(pty) && isptr(ty))) { explicitCast++; p = cast(p, ty); explicitCast--; - } else if (isptr(pty) && isint(ty) - || isint(pty) && isptr(ty)) { + } else if ((isptr(pty) && isint(ty)) + || (isint(pty) && isptr(ty))) { if (Aflag >= 1 && ty->size < pty->size) warning("conversion from `%t' to `%t' is compiler dependent\n", p->type, ty); @@ -278,11 +278,12 @@ static Tree postfix(Tree p) { Tree q; t = gettok(); q = expr(']'); - if (YYnull) + if (YYnull) { if (isptr(p->type)) p = nullcheck(p); else if (isptr(q->type)) q = nullcheck(q); + } p = (*optree['+'])(ADD, pointer(p), pointer(q)); if (isptr(p->type) && isarray(p->type->type)) p = retype(p, p->type->type); @@ -497,12 +498,13 @@ Type binary(Type xty, Type yty) { xx(unsignedlonglong); xx(longlong); xx(unsignedlong); - if (xty == longtype && yty == unsignedtype - || xty == unsignedtype && yty == longtype) + if ((xty == longtype && yty == unsignedtype) + || (xty == unsignedtype && yty == longtype)) { if (longtype->size > unsignedtype->size) return longtype; else return unsignedlong; + } xx(longtype); xx(unsignedtype); return inttype; @@ -618,8 +620,8 @@ Tree cast(Tree p, Type type) { if (src->op != dst->op) p = simplify(CVP, dst, p, NULL); else { - if (isfunc(src->type) && !isfunc(dst->type) - || !isfunc(src->type) && isfunc(dst->type)) + if ((isfunc(src->type) && !isfunc(dst->type)) + || (!isfunc(src->type) && isfunc(dst->type))) warning("conversion from `%t' to `%t' is compiler dependent\n", p->type, type); if (src->size != dst->size) -- cgit v1.2.3