aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-03-01 14:08:04 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-03-01 14:08:04 -0700
commit1d08ab087e60299a061c39fdb23903a43f12692c (patch)
treea9c9adcab55ec1e3008571bc2bc69a3d5f21b7b0 /src
parentf1d338194e9a00e56a42da1298f2ac0ed75797df (diff)
downloadzig-1d08ab087e60299a061c39fdb23903a43f12692c.tar.gz
zig-1d08ab087e60299a061c39fdb23903a43f12692c.zip
fix comparison of unsigned integers error
Diffstat (limited to 'src')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 04980b05e8..1c23f7003d 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -1376,7 +1376,7 @@ static void preview_error_value_decl(CodeGen *g, AstNode *node) {
// duplicate error definitions allowed and they get the same value
err->value = existing_entry->value->value;
} else {
- assert(g->error_value_count < (1 << g->err_tag_type->data.integral.bit_count));
+ assert(g->error_value_count < (((uint32_t)1) << (uint32_t)g->err_tag_type->data.integral.bit_count));
err->value = g->error_value_count;
g->error_value_count += 1;
g->error_table.put(&err->name, err);