aboutsummaryrefslogtreecommitdiff
path: root/AGENTS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-23 01:24:49 +0000
committer_ov4 <ov4@ov4.org>2026-10-23 01:24:49 +0000
commit0111978da7b1643d92fb70461cb44ab9723896c7 (patch)
treecef7da32e3c41a4e99bb4d1e1a11eab2c341c509 /AGENTS
parenta0dba2acdeb6e2e9af8e53a4d886fba79c7a3afe (diff)
fix(stdlib): reject NaN, infinity and hexadecimal text in IS_NUM, STR_TO_NUM and INPUT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'AGENTS')
-rw-r--r--AGENTS/PITFALLS/core-language.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/AGENTS/PITFALLS/core-language.md b/AGENTS/PITFALLS/core-language.md
index 5ff97ca..5018fb3 100644
--- a/AGENTS/PITFALLS/core-language.md
+++ b/AGENTS/PITFALLS/core-language.md
@@ -32,7 +32,7 @@ source, most also by compiling and running test programs.
- **`/` always yields REAL** (double FDiv), even for two INTEGERs; integer division is
DIV/MOD only.
- CHR returns CHAR, not STRING; CHR(0) is a NUL CHAR that converts to a one-byte STRING.
- - STR_TO_NUM always returns REAL and shares parseNumber (strtod, full consumption, overflow rejected) with IS_NUM.
+ - STR_TO_NUM always returns REAL and shares parseNumber (strtod, full consumption, overflow rejected, only `0-9 . e E + -` after leading whitespace, so no nan/inf/hex) with IS_NUM and INPUT REAL (`__cps_parse_real` in InputGen.cc); change them together.
- NUM_TO_STR keeps the full signed i64 range for INTEGER; REAL uses the shortest
round-trip text (realText in string.cc), byte-identical to OUTPUT's IR helper in
OutputGen.cc (`__cps_output_real`); change both together. C_DOUBLE output keeps `%f`.