Bug 483956 - gcc 4.4 warnings about "may be undefined" operations. r=gal

This commit is contained in:
Jeff Walden 2009-03-19 15:05:48 -07:00
parent c46b004611
commit 9e48c3b9a6

View File

@ -634,16 +634,22 @@ static LIns* demote(LirWriter *out, LInsp i)
static bool isPromoteInt(LIns* i)
{
jsdouble d;
return isi2f(i) || i->isconst() ||
(i->isconstq() && (d = i->constvalf()) == jsdouble(jsint(d)) && !JSDOUBLE_IS_NEGZERO(d));
if (isi2f(i) || i->isconst())
return true;
if (!i->isconstq())
return false;
jsdouble d = i->constvalf();
return d == jsdouble(jsint(d)) && !JSDOUBLE_IS_NEGZERO(d);
}
static bool isPromoteUint(LIns* i)
{
jsdouble d;
return isu2f(i) || i->isconst() ||
(i->isconstq() && (d = i->constvalf()) == (jsdouble)(jsuint)d && !JSDOUBLE_IS_NEGZERO(d));
if (isu2f(i) || i->isconst())
return true;
if (!i->isconstq())
return false;
jsdouble d = i->constvalf();
return d == jsdouble(jsuint(d)) && !JSDOUBLE_IS_NEGZERO(d);
}
static bool isPromote(LIns* i)