GNU bug report logs -
#62053
Guile compiler is unable to compile tiny program
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On Wed, Mar 08, 2023 at 02:07:56PM +0300, var-vniiaes--- via Bug reports for GUILE, GNU's Ubiquitous Extension Language wrote:
>
> Guile compiler is unable to compile tiny program:
>
> (define (fn l)
> (define (ok l)
> (or (and (pair? l) l)
> (error "list is empty")))
> (cons (reverse (car l)) (ok l)))
>
> amaya <at> picasso:~/tmp/guile-3.0.9
> $ ../prefix/bin/guile ~/tmp/guile-compiler-bug.scm
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> ;;; compiling /home/amaya/tmp/guile-compiler-bug.scm
> ;;; WARNING: compilation of /home/amaya/tmp/guile-compiler-bug.scm failed:
> ;;; not found 22
>
> Compiler reports confusing message here: `not found 22’.
Bizarre. Can confirm
tomas <at> trotzki:~/foo$ vim buggy.scm
tomas <at> trotzki:~/foo$ guile buggy.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;; or pass the --no-auto-compile argument to disable.
;;; compiling /home/tomas/foo/buggy.scm
;;; /home/tomas/foo/buggy.scm:2:0: warning: possibly unbound variable `#{ }#'
;;; /home/tomas/foo/buggy.scm:3:0: warning: possibly unbound variable `#{ }#'
;;; /home/tomas/foo/buggy.scm:4:0: warning: possibly unbound variable `#{ }#'
;;; WARNING: compilation of /home/tomas/foo/buggy.scm failed:
;;; not found 25
tomas <at> trotzki:~/foo$ guile --version
guile (GNU Guile) 3.0.8.57-bc3b1
Copyright (C) 2022 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
(so in my case it's 25 instead of 22). Interestingly, my version also
produces warnings about possibly unbound variables). If I enter the
code line by line into a repl, I also get a "not found 22".
Interestingly, if I add a call to fn to the end of that snippet
(e.g. (fn '(a b))), the "not found" disappears. The unbound var
warnings stay.
Cheers
--
t
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 2 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.