chicken-users
[Top][All Lists]
Advanced

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

[Bug] csc infinitely loops on expansion of macro that csi expands normal


From: Peter McGoron
Subject: [Bug] csc infinitely loops on expansion of macro that csi expands normally
Date: Sun, 29 Dec 2024 20:44:15 -0500
User-agent: Mozilla Thunderbird

Hello,

csc enters an infinite loop attempting to expand the following:

        (define-syntax make-alist
          (syntax-rules ()
            ((make-alist (key val) ...)
             (list (cons key val) ...))))
        
        (display (caar (make-alist ("cons" cons))))
        (newline)

Loading the file into csi prints "cons" as normal.

The behavior seems to be specific to the symbol "cons": csc and csi both successfully expand all of the following:

---------------------------------------------------------

        (define-syntax make-alist
          (syntax-rules ()
            ((make-alist (key val) ...)
             (list (cons key val) ...))))
        
        (display (caar (make-alist ("cons" car))))
        (newline)

----------------------------------------------------------

        (define kons cons)

        (define-syntax make-alist
          (syntax-rules ()
            ((make-alist (key val) ...)
             (list (kons key val) ...))))
        
        (display (caar (make-alist ("cons" cons))))
        (newline)

----------------------------------------------------------

        (define kons cons)
        
        (define-syntax make-alist
          (syntax-rules ()
            ((make-alist (key val) ...)
             (list (cons key val) ...))))
        
        (display (caar (make-alist ("cons" kons))))
        (newline)

----------------------------------------------------------

Chicken Version: 5.4.0 (compiled from release tarball)
OS: Alpine Linux x86_64
CC: GCC Alpine 13.2.1_git20240309 (using musl libc)




reply via email to

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