Get unqualified types before doing anything in semantic_arithmetic().
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 12:50:12 +0000 (12:50 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 12:50:12 +0000 (12:50 +0000)
[r21967]

parser.c

index 7bfb77f..1502d2e 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -7597,6 +7597,9 @@ static type_t *semantic_arithmetic(type_t *type_left, type_t *type_right)
 {
        /* TODO: handle complex + imaginary types */
 
+       type_left  = get_unqualified_type(type_left);
+       type_right = get_unqualified_type(type_right);
+
        /* ยง 6.3.1.8 Usual arithmetic conversions */
        if (type_left == type_long_double || type_right == type_long_double) {
                return type_long_double;