From da314b492202a347df9ec10649b33d0d7d2fe7e3 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 24 Jun 2024 05:39:29 +0200 Subject: Assert that integer types don’t exceed 128 bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.c b/src/codegen.c index f31bcf4..fe8e63b 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -333,7 +333,7 @@ type2llvm(struct cgctx ctx, type_t t) } if (t.size == 0) return LLVMIntPtrTypeInContext(ctx.ctx, ctx.td); - assert((unsigned)t.size * 8 <= UINT8_MAX); + assert((unsigned)t.size * 8 <= 128); return LLVMIntTypeInContext(ctx.ctx, t.size * 8); default: __builtin_unreachable(); -- cgit v1.2.3