From: Christoph Mallon Date: Mon, 26 Nov 2007 17:47:19 +0000 (+0000) Subject: Skip typerefs when comparing the pointed-to types of pointers. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=80f6ddcafe07344d1ec0fa8b102076db7c7386f1;p=cparser Skip typerefs when comparing the pointed-to types of pointers. [r18539] --- diff --git a/parser.c b/parser.c index d1f4930..64b0288 100644 --- a/parser.c +++ b/parser.c @@ -777,6 +777,9 @@ static void semantic_assign(type_t *orig_type_left, expression_t **right, type_t *points_to_left = pointer_type_left->points_to; type_t *points_to_right = pointer_type_right->points_to; + points_to_left = skip_typeref(points_to_left); + points_to_right = skip_typeref(points_to_right); + if(!is_atomic_type(points_to_left, ATOMIC_TYPE_VOID) && !is_atomic_type(points_to_right, ATOMIC_TYPE_VOID) && !types_compatible(points_to_left, points_to_right)) {