mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-13 22:22:27 +00:00
[qfcc] Demote implicit double vector literals correctly
The code for demoting the literals wasn't taking the width into account.
This commit is contained in:
parent
8de722bfc7
commit
327cb88af3
1 changed files with 2 additions and 2 deletions
|
@ -1128,11 +1128,11 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
}
|
||||
|
||||
if (is_constant (e1) && is_double (t1) && e1->implicit && is_float (t2)) {
|
||||
t1 = &type_float;
|
||||
t1 = float_type (t2);
|
||||
e1 = cast_expr (t1, e1);
|
||||
}
|
||||
if (is_constant (e2) && is_double (t2) && e2->implicit && is_float (t1)) {
|
||||
t2 = &type_float;
|
||||
t2 = float_type (t1);
|
||||
e2 = cast_expr (t2, e2);
|
||||
}
|
||||
if (is_array (t1) && (is_ptr (t2) || is_integral (t2))) {
|
||||
|
|
Loading…
Reference in a new issue