From c069bafad8eea1be5b59dce3096435a2919b3a40 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 7 Mar 2011 14:04:05 +0900 Subject: [PATCH] Support casting from enum to float. --- tools/qfcc/source/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 76fd3de6e..dc6100620 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -2587,7 +2587,7 @@ cast_expr (type_t *type, expr_t *e) && (e_type == &type_float || e_type == &type_integer || e_type->type == ev_pointer)) || (type == &type_float - && (e_type == &type_integer)))) { + && (e_type == &type_integer || is_enum (e_type))))) { return cast_error (e, get_type (e), type); } if (is_array (e_type)) {