mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Cast rather than alias for testing constants
Fixes ICE in do { ... } while (1);
This commit is contained in:
parent
55e53211e2
commit
9c26d12f95
1 changed files with 10 additions and 2 deletions
|
@ -96,14 +96,22 @@ test_expr (expr_t *e)
|
|||
case ev_uinteger:
|
||||
case ev_integer:
|
||||
case ev_short:
|
||||
if (type_default != &type_integer)
|
||||
if (type_default != &type_integer) {
|
||||
if (is_constant (e)) {
|
||||
return cast_expr (type_default, e);
|
||||
}
|
||||
return new_alias_expr (type_default, e);
|
||||
}
|
||||
return e;
|
||||
case ev_float:
|
||||
if (options.code.fast_float
|
||||
|| options.code.progsversion == PROG_ID_VERSION) {
|
||||
if (type_default != &type_float)
|
||||
if (type_default != &type_float) {
|
||||
if (is_constant (e)) {
|
||||
return cast_expr (type_default, e);
|
||||
}
|
||||
return new_alias_expr (type_default, e);
|
||||
}
|
||||
return e;
|
||||
}
|
||||
new = new_float_expr (0);
|
||||
|
|
Loading…
Reference in a new issue