mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Dereference cast expression
This commit is contained in:
parent
52d38ce8a6
commit
ae4d87b969
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ cast_expr (const type_t *dstType, const expr_t *e)
|
|||
dstType = unalias_type (dstType);
|
||||
srcType = get_type (e);
|
||||
|
||||
if (is_reference (srcType)) {
|
||||
srcType = dereference_type (srcType);
|
||||
e = pointer_deref (e);
|
||||
}
|
||||
|
||||
if (dstType == srcType)
|
||||
return e;
|
||||
|
||||
|
|
Loading…
Reference in a new issue