diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 15:11:38 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 15:21:14 +0000 |
| commit | 64622b737f070b377fdef3fb31a67c084457bd7b (patch) | |
| tree | 8111bfcf325ed9162dac645a0c68536bad954820 /lib/CodeGen/Builtins.h | |
| parent | f14b50d776ec743bd62fda22a9c154bba9588840 (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/CodeGen/Builtins.h')
| -rw-r--r-- | lib/CodeGen/Builtins.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/Builtins.h b/lib/CodeGen/Builtins.h index 2163b3e..84ba765 100644 --- a/lib/CodeGen/Builtins.h +++ b/lib/CodeGen/Builtins.h @@ -18,6 +18,7 @@ inline constexpr BuiltinInfo Builtins[] = { {"MALLOC", 1, "C_TYPE(\"void*\")"}, {"REALLOC", 2, "C_TYPE(\"void*\")"}, {"FREE", 1, "C_TYPE(\"void*\")"}, + {"INT", 1, "INTEGER"}, }; inline const BuiltinInfo *findBuiltin(const std::string &Name) { |
