diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-04 01:21:34 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-04 01:21:34 +0000 |
commit | 45d6a88841f0db650d615522b1f6594ea72ceb7e (patch) | |
tree | dec4fac8ff8638b6a0d8749d52e66d0207eb161b /lcc/src/expr.c | |
parent | 6d9be1722b2221cae39b389ce218e93d73d99335 (diff) | |
download | ioquake3-aero-45d6a88841f0db650d615522b1f6594ea72ceb7e.tar.gz ioquake3-aero-45d6a88841f0db650d615522b1f6594ea72ceb7e.zip |
* 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
Diffstat (limited to 'lcc/src/expr.c')
-rw-r--r-- | lcc/src/expr.c | 20 |
1 files changed, 11 insertions, 9 deletions
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) |