Bunny351: the minimal example to break srfi-13's string-null? pasted by zilti on Wed Mar 25 00:20:54 2026

;;; Code

(import (scheme write))
(import (srfi 13))
(import (only (chicken string) ->string))

(display
 (string-append
  "Self-test: (string-null? \"\") => " (->string (string-null? "")) "\n"))

;;; Results

Compiled with csc -sJ -fixnum-arithmetic -optimize-leaf-routines -local -inline -lfa2 -inline-global -specialize -d1 minimal.scm:

Self-test: (string-null? "") => #f

Compiled with csc -fixnum-arithmetic -optimize-leaf-routines -local -inline -lfa2 -inline-global -d1 minimal.scm:

Self-test: (string-null? "") => #t

Correction added by zilti on Wed Mar 25 00:46:32 2026

The first compilation line is of course without the "-sJ". I mis-copied that into the paste.