chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"cannot coerce inexact literal to fixnum"


From: Al
Subject: "cannot coerce inexact literal to fixnum"
Date: Sat, 10 Feb 2024 02:42:39 +0200
User-agent: Betterbird (Linux)

(import (chicken fixnum))
; (declare (fixnum))
(define mp most-positive-fixnum)

(display mp) (newline)
(display (string->number (number->string mp))) (newline)

(display #x7fffffff) (newline)
(display (string->number "#x7fffffff")) (newline)


Obviously the first number is much greater than INT32_MAX. However, if I enable fixnum, csc chokes on both the third and fourth display's with: "Error: cannot coerce inexact literal `2147483647' to fixnum". It compiles and runsĀ fine if those lines are commented out (or if fixnum is disabled).


Not sure what's wrong here. Tried with both 5.3.0 and 5.3.1-pre.


-- Al




reply via email to

[Prev in Thread] Current Thread [Next in Thread]