aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-05-28 20:57:02 +0100
committergingerBill <bill@gingerbill.org>2019-05-28 20:57:02 +0100
commitb894e2b3788307546e330bd43304e5ff785dac51 (patch)
tree4d354bbb2be385626035f3bada3c4fda363b0ced /src/check_type.cpp
parentc40acd008e92f8385ac1535adcbb4d7a46ce0a0e (diff)
Fix bit set size with 128-bit integers
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 1ab975b07..ca0fab260 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -948,7 +948,8 @@ void check_bit_set_type(CheckerContext *c, Type *type, Type *named_type, Ast *no
ast_node(bs, BitSetType, node);
GB_ASSERT(type->kind == Type_BitSet);
- i64 const MAX_BITS = 64;
+ i64 const DEFAULT_BITS = cast(i64)(8*build_context.word_size);
+ i64 const MAX_BITS = 128;
Ast *base = unparen_expr(bs->elem);
if (is_ast_range(base)) {