The attached code fails when compiled with -strict-types.


$ csc -strict-types -verbose strcttps.scm /usr/bin/chicken strcttps.scm -output-file strcttps.c -strict-types -verbose

Note: in local procedure `doloop9',
 in toplevel procedure `foo#bar':
(strcttps.scm:10) in procedure call to `null?', the predicate is called with an argument of type `null' and will always return true gcc strcttps.c -o strcttps.o -c -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I"/usr/include/chicken" rm strcttps.c gcc strcttps.o -o strcttps -L"/usr/lib" -Wl,-R"/usr/lib" -lchicken -lm -ldl rm strcttps.o $ ./strcttps gaga



My bad?

Best

/Jörg


......
(module
 foo
 (bar)
 (import scheme chicken)

 (define (bar . args)
   (let ((foobar '()))
     (do ((rest args (cddr rest)))
	 ((null? rest)
	  (if (null? foobar)
	      'gaga
	      foobar))
       (if (null? (cdr rest))
	   (error (car rest)))
       (case (car rest)
	 ((#:foobar)
	  (set! foobar (cons (cadr rest) foobar)))))))

)

(import foo)

(display (bar #:foobar 42))
(newline)
_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to