mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
Use type check helpers some more
This commit is contained in:
parent
5d302ff6f4
commit
5c36c60005
1 changed files with 5 additions and 5 deletions
|
@ -2385,11 +2385,11 @@ cast_expr (type_t *type, expr_t *e)
|
|||
c = new_alias_expr (type, e);
|
||||
return c;
|
||||
}
|
||||
if (!(type->type == ev_pointer
|
||||
&& (e_type->type == ev_pointer || is_integral (e_type)
|
||||
if (!(is_pointer (type)
|
||||
&& (is_pointer (e_type) || is_integral (e_type)
|
||||
|| is_array (e_type)))
|
||||
&& !(is_integral (type) && e_type->type == ev_pointer)
|
||||
&& !(type->type == ev_func && e_type->type == ev_func)
|
||||
&& !(is_integral (type) && is_pointer (e_type))
|
||||
&& !(is_func (type) && is_func (e_type))
|
||||
&& !(is_scalar (type) && is_scalar (e_type))) {
|
||||
return cast_error (e, e_type, type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue