From 64622b737f070b377fdef3fb31a67c084457bd7b Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:11:38 +0000 Subject: feat(codegen)!: require explicit REAL to INTEGER conversion and add INT Implicit REAL to INTEGER is now a compile error with an INT(...) hint. INT is a compiler builtin that truncates toward zero and raises a runtime error for NaN or values outside the INTEGER range. No existing test program relied on the implicit conversion. Co-Authored-By: Claude Sonnet 5.5 --- include/cps/CodeGen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/cps') diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index b31cd3d..3b0296f 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -201,6 +201,7 @@ class CodeGen { // Read a value from resolved storage. llvm::Value *loadFromLValue(const LValueInfo &LV); llvm::Value *emitAllocationSize(ExprAST *Expr); + llvm::Value *emitIntBuiltin(ExprAST *Arg, int Line); llvm::Value *emitCall(const std::string &Callee, const std::vector> &ArgExprs, int Line, const std::vector *Explicit = nullptr); -- cgit v1.3.1-4-g156e