ast: Remove redundant test.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 12 Dec 2012 10:12:54 +0000 (11:12 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 12 Dec 2012 15:57:15 +0000 (16:57 +0100)
Complex types are scalar.

ast.c

diff --git a/ast.c b/ast.c
index eda9b70..84367c8 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1850,10 +1850,9 @@ check_type:
                return is_constant_expression(expression->unary.value);
        }
 
                return is_constant_expression(expression->unary.value);
        }
 
-
        case EXPR_UNARY_CAST: {
                type_t *const type = skip_typeref(expression->base.type);
        case EXPR_UNARY_CAST: {
                type_t *const type = skip_typeref(expression->base.type);
-               if (is_type_scalar(type) || is_type_complex(type))
+               if (is_type_scalar(type))
                        return is_constant_expression(expression->unary.value);
                if (!is_type_valid(type))
                        return EXPR_CLASS_ERROR;
                        return is_constant_expression(expression->unary.value);
                if (!is_type_valid(type))
                        return EXPR_CLASS_ERROR;