Unalias types when checking cast-compatibility

This fixes the problem with passing typedefs to function parameters.
This commit is contained in:
Bill Currie 2020-02-26 17:49:09 +09:00
parent 69b5029de5
commit 4cec3bbff6

View file

@ -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))