From 4cec3bbff6aa749490ae8a947b6f65c288d9278d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 26 Feb 2020 17:49:09 +0900 Subject: [PATCH] Unalias types when checking cast-compatibility This fixes the problem with passing typedefs to function parameters. --- tools/qfcc/source/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 9ad394a07..c23460b06 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -2374,7 +2374,7 @@ cast_expr (type_t *dstType, expr_t *e) srcType = get_type (e); - if (dstType == srcType) + if (unalias_type (dstType) == unalias_type (srcType)) return e; if ((dstType == type_default && is_enum (srcType))