From: Matthias Braun Date: Fri, 30 May 2008 16:26:34 +0000 (+0000) Subject: fix crash X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=d3d104f81e5fa2edda9fc38d51e73d1c409fee3f;p=cparser fix crash [r19857] --- diff --git a/parser.c b/parser.c index a8124d8..338c975 100644 --- a/parser.c +++ b/parser.c @@ -6344,9 +6344,9 @@ static void semantic_comparison(binary_expression_t *expression) other_expr = left; } - type_t *other_type = skip_typeref(other_expr->base.type); if(const_expr != NULL) { - long val = fold_constant(const_expr); + type_t *other_type = skip_typeref(other_expr->base.type); + long val = fold_constant(const_expr); /* TODO: check if val can be represented by other_type */ (void) other_type; (void) val;