Fixed bug in initalization expression handling

This commit is contained in:
ceriel 1992-04-21 09:54:32 +00:00
parent 5d9c7f4d9b
commit 47c7e6a43d

View file

@ -72,11 +72,18 @@ arithbalance(e1p, oper, e2p) /* 3.1.2.5 */
*/ */
/* ??? t1 == LNGDBL, t2 == DOUBLE */ /* ??? t1 == LNGDBL, t2 == DOUBLE */
if (t1 == LNGDBL) { if (t1 == LNGDBL) {
if (t2 != LNGDBL) if (t2 != LNGDBL) {
if (t2 == DOUBLE || t2 == FLOAT)
float2float(e2p, lngdbl_type);
else
int2float(e2p, lngdbl_type); int2float(e2p, lngdbl_type);
}
return; return;
} else if (t2 == LNGDBL) { } else if (t2 == LNGDBL) {
if (t1 != LNGDBL) if (t1 != LNGDBL)
if (t1 == DOUBLE || t1 == FLOAT)
float2float(e1p, lngdbl_type);
else
int2float(e1p, lngdbl_type); int2float(e1p, lngdbl_type);
return; return;
} }
@ -85,11 +92,15 @@ arithbalance(e1p, oper, e2p) /* 3.1.2.5 */
is converted to double. is converted to double.
*/ */
if (t1 == DOUBLE) { if (t1 == DOUBLE) {
if (t2 != DOUBLE) if (t2 == FLOAT)
float2float(e2p, double_type);
else if (t2 != DOUBLE)
int2float(e2p, double_type); int2float(e2p, double_type);
return; return;
} else if (t2 == DOUBLE) { } else if (t2 == DOUBLE) {
if (t1 != DOUBLE) if (t1 == FLOAT)
float2float(e1p, double_type);
else if (t1 != DOUBLE)
int2float(e1p, double_type); int2float(e1p, double_type);
return; return;
} }