diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:28:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 14:28:31 -0400 |
| commit | 9638d3b4456bef848f4ad5c8ffe150bdfa35dbea (patch) | |
| tree | 797036156109f5f7ca727d3588e98e2ee9d55fc6 /src/typecheck.c | |
| parent | 92e723128ebce5a2b974c5e0c90454f3b13a5cbc (diff) | |
Minor compat fix
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/typecheck.c b/src/typecheck.c index 86822a16..7920abc7 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -57,7 +57,7 @@ type_t *parse_type_ast(env_t *env, type_ast_t *ast) if (has_stack_memory(item_t)) code_err(item_type, "Arrays can't have stack references because the array may outlive the stack frame."); if (type_size(item_t) > ARRAY_MAX_STRIDE) - code_err(ast, "This array holds items that take up ", type_size(item_t), + code_err(ast, "This array holds items that take up ", (uint64_t)type_size(item_t), " bytes, but the maximum supported size is ", ARRAY_MAX_STRIDE, " bytes. Consider using an array of pointers instead."); return Type(ArrayType, .item_type=item_t); } @@ -68,7 +68,7 @@ type_t *parse_type_ast(env_t *env, type_ast_t *ast) if (has_stack_memory(item_t)) code_err(item_type, "Sets can't have stack references because the array may outlive the stack frame."); if (type_size(item_t) > ARRAY_MAX_STRIDE) - code_err(ast, "This set holds items that take up ", type_size(item_t), + code_err(ast, "This set holds items that take up ", (uint64_t)type_size(item_t), " bytes, but the maximum supported size is ", ARRAY_MAX_STRIDE, " bytes. Consider using an set of pointers instead."); return Type(SetType, .item_type=item_t); } |
