summaryrefslogtreecommitdiff
path: root/frontends/ast/simplify.cc
diff options
context:
space:
mode:
authorWilliam Speirs <bill.speirs@gmail.com>2014-10-14 17:16:50 -0400
committerClifford Wolf <clifford@clifford.at>2014-10-17 11:28:14 +0200
commitfda52f05f277720e12aadb4716415ec9bff616a5 (patch)
treef2925eb3dec8ae97ca228532d92f09288efbe246 /frontends/ast/simplify.cc
parent34caeeb4f3e21d8da3b75682e48ab85c27021b82 (diff)
Wrapped math in int constructor
Diffstat (limited to 'frontends/ast/simplify.cc')
-rw-r--r--frontends/ast/simplify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 7e15283c..70976b68 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -1123,7 +1123,7 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
if (left_at_zero_ast->type != AST_CONSTANT || right_at_zero_ast->type != AST_CONSTANT)
log_error("Unsupported expression on dynamic range select on signal `%s' at %s:%d!\n",
str.c_str(), filename.c_str(), linenum);
- result_width = abs(left_at_zero_ast->integer - right_at_zero_ast->integer) + 1;
+ result_width = abs(int(left_at_zero_ast->integer - right_at_zero_ast->integer)) + 1;
}
did_something = true;
newNode = new AstNode(AST_CASE, shift_expr);