This seems to be a bug. Please file an issue report on https://github.com/feeley/gambit/issues to remind me to get back to it when I have some time.
As a temporary workaround you can do
(define ($sc-put-cte . rest) #f)
at the top of your file (untested!).
Marc
On Mar 4, 2015, at 5:08 AM, Emmanuel Medernach Emmanuel.Medernach@iphc.cnrs.fr wrote:
Hello,
I have problem running a bunch of code compiled with gambit scheme version 4.7.4 which runned fine with version 4.6.9.
This problem tracked down to macros, here is a minimal file:
$ cat list.scm
(define-syntax dummy (syntax-rules () ((dummy a b ...) (time (begin a b ...)))))
;; SRFI 1 iota (define (iota count) (let loop ((i 1) (result '())) (if (> i count) (reverse result) (loop (+ i 1) (cons i result)))))
(dummy (length (iota 1000000)))
With Gambit version 4.6.9
$ gsc -:s -o list.c -c list.scm $ gsc -:s -o link.c -link list.c $ gcc -o list list.c link.c -ldl -lm -lgambc -lutil -L${GAMBITDIR}/lib/ -I${GAMBITDIR}/include/ $ ./list (time (length (iota 1000000))) 80 ms real time 79 ms cpu time (61 user, 18 system) 5 collections accounting for 55 ms real time (48 user, 6 system) 96000000 bytes allocated 23512 minor faults no major faults
With Gambit version 4.7.4
$ gsc -:s -o list.c -c list.scm $ gsc -:s -o link.c -link list.c *** WARNING -- "$sc-put-cte" is not defined, *** referenced in: ("list.c") *** WARNING -- "$syntax-dispatch" is not defined, *** referenced in: ("list.c") *** WARNING -- "syntax-error" is not defined, *** referenced in: ("list.c") $ gcc -o list list.c link.c -ldl -lm -lgambc -lutil -L${GAMBITDIR}/lib/ -I${GAMBITDIR}/include/ $ ./list *** ERROR IN | list| -- Operator is not a PROCEDURE (#!unbound '#(syntax-object dummy ((top) #(ribcage #(dummy) #((top)) #(dummy)))) '#<procedure #2> '*top*)
What is now the correct way to compile with macros in Gambit version 4.7.4 ?
Emmanuel _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list